Koala ROS stack
The koala ROS stack is available on the rpms_ims svn repository into the ROS subdirectory :
koala_description : provides a description of the structure of the robot with all the transformation frames
koala_driver : this is the "low level" driver which allows to communicate with the koala without ROS
koala_node : this provides ROS nodes wrappings the objects of koala_driver
To test this package :
roslaunch koala_node bringup.launch koala_dns:=THE_IP_OF_THE_ROBOT
Node camera_node :
publishes to image_raw in RGB8
Node camera_position_node :
publishes to perception_camera_position (geometry_msgs ::PointStamped)
subscribes to cmd_pos (geometry_msgs ::PointStamped)
The PointStamped message p send to the cmd_pos topic is understood as : p.x : pan ; p.y : titlt ; The pan and tilt are expected in degrees with the range pan in [-100,100] deg ; and tilt in [0, 100] deg.
Node wheels_nodes :
publishes to perception_wheel_speed (geometry_msgs ::TwistStamped), ir/range (std_msgs ::Float32MultiArray), ir/raw (std_msgs ::Int32MultiArray)
subscribes to cmd_vel (geometry_msgs ::Twist)
The Twist message on the cmd_vel topic must be given in standard units : m/s for the linear speeds and rad/s for the angular speeds.
Node odom_node :
publishes to odom (nav_msgs ::Odometry)
subscribes to perception_wheel_speed (geometry_msgs ::TwistStamped)
Below is a screenshot of what you can get inside rviz when running the odometry node and koala_description package with the TF. Be carefull when using the TF of the koala_description, this package is a work in progress.
Using a Hokuyo laser scan with the Koala (to be updated...)
In order to make use of a Hokuyo laser on the Koala, you need to plug it, a single USB connection seems sufficient. And you need to run a server on the koala dedicated to process and transmit the data from the sensor. Finally, depending on where you place the hokuyo, you need to adjust its TF in koala_publisher/src/koala_static_tf.cpp
The library to communicate with the Hokuyo is the liburg (available on the ubuntu repositories, or online. However, on the Koala that are running under ubuntu 10.04, the liburg is not available in the respositories.
To make use of the Hokuyo sensor on a koala, you need to install the following dependencies :
You can then build and install the URG library from the sources
Given that the URG library is installed, you can now start a server which makes use the KTeam protocol for sending out the sensor values of the Hokuyo laser scanner. To compile hokuyo_server.cc, check the head of the source file.
Before running the server, we need to change the permissions of the Hokuyo device :
sudo chmod a+rw /dev/ttyACM0
If you get an issue, check out the response of ’dmesg’ on the Koala, and look for lines like "cdc_acm 3-1:1.0 : ttyACM0 : USB ACM device" ; It clearly states the /dev/ port where the device is connected. If different from /dev/ttyACM0, you will also have to correct it in the hokuyo_server.cc file.
You can then run the server :
You can now communicate with the server with telnet ;
bash$ telnet koala2.smart 4103
Connected to localhost.
Escape character is '^]'.
n, 0, 0, -1, -1, 512, ... . ... . ..
The server recognizes only the ’N’ command to which it replies the sensor values. Anyother command will close the connection.
You can use, on your host, the ROS koala_hokuyo_node provided in the koala_publisher package to produce LaserScan messages from the data sent by the server.
To run it manually :
rosrun koala_publisher koala_hokuyo_node _hostname:=koala2.smart _port:=4103
It publishes a LaserScan message on the /koala/hokuyo topic ; You can look at it using rviz.
Launching the hokuyo server on startup
If you now want to make the hokuyo server starts on startup of the koala, you can edit the file /etc/rc.local and add :
# the servers for the hokuyo, if plugged ..
chmod a+rw /dev/ttyACM0
Example using the hokuyo node : Mapping a room
Using the hokuyo with the ROS package hector_mapping, it is straightforward to build up a map of a room. Using the default values of the launch file from hector_mapping and putting it with the koala leads to koala_hector_mapping.launch and the following map :
Hector mapping does not need odometry to be published. Actually, when using our odometry node with gmapping led to several issues in the map. Using hector mapping which does not need odometry led to better mappings.
The map has been saved using the map_saver node of map_server