neurovertex / ros_indigo_khepera3_node

ROS Node for the Khepera III robot. Publishes mounted URG sensor information as well as odometry data from Player to ROS.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Khepera3_node

This node retreives odometry and LaserScan (LIDAR) information from a Khepera3 on the network through Player (using K-Team's cfg file), and publishes them on ROS.

Topics

  • /laser : Scans (from the urglaser driver - or any Player laser-providing driver) are published as LaserScan messages on the /laser topic at 10Hz and associated with the laser frame.
  • /odom : Odometry data, in addition to being published as a tf transformation, is also published as a nav_msgs::Odometry message, to account for speed information. Note that the khepera doesn't seem to actually measure speed from its wheels but assume it moves as its motors should make it do (pushing it will change reported position but speed will stay null).
  • /cmd_vel is listened to for velocity commands (turtlebot/turtlesim-like). If no command is received through the topic for 2 seconds, speed is reset to 0.

Frames

This node uses khepera as its base frame (base_link for SLAM nodes), and publishes khepera->odom information from Odometry, odombeing ideally a fixed point at the origin of the map, but in practice has to be corrected by location algorithms to account for location error. It also publishes khepera->laser, which is a fixed translation of {0.02, 0, 0.10}, accounting for the offset between the base of the robot and the laser.

Launch files

Included are severeal launch files.

  • khepera_node.launch starts the node plus a tf/static_tranform_publisher to set map=world. It is included by all others.
  • gmapping.launch file that launches everything needed to run Gmapping on the robot's data. Gmapping will generate a map and publish the odom->map transform, giving the corrected absolute position of the robot on the map.
  • amcl.launch lauches amcl to locate the robot on a static map (e.g built with Gmapping). You'll need to publish the static map (e.g map_server) separately.
  • move_base starts amcl and move_base, to control your robot. If everything works as intended, your robot should be capable of autonomous navigation with that.

Results

Here's the SLAM-generated map obtained

The map

Here's what the robot looks like :

The robot

Yeah I really need to find a shorter cable


In theory, this code should work for any robot supporting Player with position2d and laser drivers, Only the relative position of the laser to the robot frame might need to be changed. To be tested.

About

ROS Node for the Khepera III robot. Publishes mounted URG sensor information as well as odometry data from Player to ROS.


Languages

Language:C++ 78.7%Language:CMake 21.3%