ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

As I understand your system (from the commentary above), what you want to do is write a ROS node that acts as a bridge.

Code already running on your robot transmits XML; you write a ROS node that listens on a socket for these data, and then transforms them into ROS messages, and republishes them. Similarly, that node listens on ROS topics for commands (for example, Twist messages on /cmd_vel), translates them into your robot's XML format, and transmits them to the robot.

Your sonar data are probably best published as a sensor_msgs/LaserScan message (note that doing SLAM with sonar data is...tricky; it's worth a try, though). The canonical ROS way of sending robot instructions is a geometry_msgs/Twist message published to /cmd_vel; those two, plus some tf frames, should be enough to get you started.