Hi Adrian,
Good question. I've considered it a bit with my recent HSR-01 purchase. AFAIK there is no easy way to do hexapods in ROS yet.
However there are a few things you can do:
1) The quick and dirty approach is to adapt ros_arduino_bridge to work with your hexapod. If the hexapod accepts a forward sped and turn speed command, then that's pretty easy to do. You can also estimate your odometery by what commands you've done, and avoid having wheel encoders. You won't be able to 'see' it's a hexapod, though, and in RVIZ it'll look just like a wheeled robot. But it gets you the benefits of ROS, and being able to use the navigation stack, etc.
2) A much more indepth way to do it would be involve:
- Do everything in step 1, so your robot can drive around under ROS control.
- Write some code to publish a jointstate message from the robot showing the position of all the servos.
- Write a URDF file that describes the joints of your robot and how they're related.
- Run the jointstate message through the robot_state_publisher and give it the URDF file. This will publish the appropriate TF tree, which can then be viewed in RVIZ.
3) A much, much more indepth way to do it would be to
- Do everything in steps 1 & 2
- Rather than let the hexapod work out it's own kinematics (how to move the legs to acomplish a given goal), you can use the ROS kinematics packages and have it calculate how to move to given targets.
- This is a lot more work, and I don't know how you'd do a lot of it, but it is the way you'd have to do it to get a native 3D understanding of the robot. E.g. if the robot walks up a step, for it to understand to raise its legs higher, etc.
Hope this helps,
Gav.