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

Connecting my Custom Robot to ROS

asked 2012-04-17 01:15:03 -0500

MarkyMark2012 gravatar image

updated 2014-01-28 17:11:59 -0500

ngrennan gravatar image

Hi All,

I wanted to get and idea of your thoughts on the best way to "connect"/use ROS with my own robot. I've long since written code/custom navigation for my robot which is fitted with the usual suspects (X&Y coordinates/Gyro/Sonar and IR range finders).

I'd like to have a play around with ROS but I'm not sure the best place to start?

My robot sends it a telemetry stream and accepts motion commands (et al). Do I some how interface with this stream on the PC - via the Server I'd built. Therefore I don’t actually need to worry about writing new code for the MPU. Or something else?

I'd really appreciate some guidance. Also would the SLAM stack work OOTB with Sonar data?

Many Thanks in Advance (Probably more questions to follow)


edit retag flag offensive close merge delete


Okay still looking around - I found ros_comm. The initial entry point into the host PC for my robot is a serial port, but is then looked after by a server (TCP/IP) there something similar I can connect to this with? Then read in the data and slice it up into the various sensor parts?

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-04-17 04:53:33 -0500 )edit

rosbridge I'm guessing - then what would be the best place to break up the data and untimatly create a sonar based map? (Sorry partly answering - I think - my own questions as I go here??) Yes/No/Barking up the totally wrong tree?

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-04-17 05:04:06 -0500 )edit

Can you give some more details of the code you have now? For example, if it currently pushes bits over a network socket to some listener, is it pushing all of the data (controls, sensors, etc.) or are there several different streams?

Mac gravatar image Mac  ( 2012-04-23 14:05:50 -0500 )edit

Yep - I have a server app which is basically not much more than a RS232 Port to Socket converter (I realize I could use rosserial here but I want to keep the svr my homebrew navigation apps use it). XML telemetry stream - sensors/position/control cmds etc back and fourth from the host PC to the bot

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-04-23 19:15:02 -0500 )edit
MarkyMark2012 gravatar image MarkyMark2012  ( 2012-04-23 21:13:49 -0500 )edit

2 Answers

Sort by » oldest newest most voted

answered 2012-04-24 06:33:11 -0500

Mac gravatar image

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.

edit flag offensive delete link more


Great thanks Mac!

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-04-24 12:15:59 -0500 )edit

Accept the answer? (Karma!)

Mac gravatar image Mac  ( 2012-04-25 04:25:47 -0500 )edit

Oopps - I've made it so :)

MarkyMark2012 gravatar image MarkyMark2012  ( 2012-04-25 21:56:31 -0500 )edit

Is 'joy' an example of a bridge node?

vvyogi gravatar image vvyogi  ( 2017-03-26 14:29:08 -0500 )edit

answered 2012-04-24 15:52:57 -0500

Newbee gravatar image

Hello there , I am a newbee for ROS. I don't know and I wanna know which of c++ or python is good to start ?

Can you post some very basic tuts who are reading this post and thank you.

edit flag offensive delete link more


This is not a forum. Please don't pose non-answers as answers. If you have a specific question, first search if it has been answered before and create a new question.

Lorenz gravatar image Lorenz  ( 2012-04-24 21:00:39 -0500 )edit

Plus, if you post this as a real question, I'll even answer it for you.

Mac gravatar image Mac  ( 2012-04-25 04:25:11 -0500 )edit

Question Tools


Asked: 2012-04-17 01:15:03 -0500

Seen: 2,142 times

Last updated: Apr 24 '12