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

How to implement ROS in my custom made robot ?

asked 2017-09-02 13:27:46 -0600

sezan92 gravatar image

Hello.

I have worked ROS and Gazebo for many days. I am confused about how to use ros with any new custom made robot ? Suppose a robot has a hardware of arduino or raspberry pi ..How to run that robot using my ROS language , like publishing to /cmd_vel topic etc?

edit retag flag offensive close merge delete

Comments

This is a very broad question. Can you narrow it down a bit? Also, have you gone through the tutorials?

jayess gravatar image jayess  ( 2017-09-02 14:29:52 -0600 )edit

I have gone through the tutorials .. I can work on ROS + Gazebo .. But I haven't implemented ROS in my Real life robot yet

sezan92 gravatar image sezan92  ( 2017-09-04 06:37:53 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
4

answered 2017-09-04 04:25:40 -0600

R. Tellez gravatar image

When you have a new robot, you will need to ROSify that robot. What does it mean? You will have to build a series of nodes (among other things) that make the translation between your hardware and the ROS core.

Some basic steps to start:

  1. You should write the URDF of your robot that describes the different links in your robot, joints and sensors, and different frames that it has. You will need that in order to represent your robot in Rviz, show the robot current status and be able to compute sensor data from different frames. If you don't know how to do the URDF of your robot, you can check this tutorial.

  2. Next thing is to write some nodes to read the sensor data and publish it in ROS topics. This means that you have to write a node that communicates with the hardware (arduino, raspberry, pc, whatever...) and requests to it the sensor data, receives the data, and converts that data from the hardware format to a topic message. You can find already existing types of messages here, but depending on your sensors, you may need to create a new type of message (this tutorial shows how to create a new message for a topic)

  3. Finally, you may need to write the controllers for your robot joints, wheels or any other actuator the robot has. Those nodes should provide topics or services which when some other node calls them, they should convert the command sent into the appropriate commands for the hardware you are using, so they make the robot move/actuate. Here there is a tutorial about ROS control that may help you on this.

You can see an example of ROSification in the nodes created by Melonee Wise for ROSifying the Sphero robot. The code is here. It contains everything open source so you can see how that ROSification may apply to your specific case.

ROSifying a robot is quite a job, but once you have it done, your robot will move in the ROS realm with all its advantages attached. So go for it! You will learn a lot in the process.

edit flag offensive delete link more

Comments

thanks for the answer .. In gazebo simulation. we need implement plugins to make the robot work on sensors or controllers .. like differential drive plugins for cmd_vel topic, imu sensor plugins for imu sensors.. In the real world like working with ROS arduino , we need to code in arduino ourselves?

sezan92 gravatar image sezan92  ( 2017-09-04 06:40:33 -0600 )edit

which code of sphero ros is showing the Rosification part ?

sezan92 gravatar image sezan92  ( 2017-09-04 06:43:06 -0600 )edit
1

Nice answer - personally I would put 2 then 3 as the first tasks to tackle then 1 as a "nice to have" :)

MarkyMark2012 gravatar image MarkyMark2012  ( 2017-09-04 07:21:06 -0600 )edit

Sezan92, in the real world you have two options:

  1. Either you code in arduino using ROS for Arduino ( http://wiki.ros.org/rosserial_arduino... ).
  2. Or you can have the node in an external computer that communicates with the arduino board.
R. Tellez gravatar image R. Tellez  ( 2017-10-03 14:27:56 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2017-09-02 13:27:46 -0600

Seen: 3,460 times

Last updated: Sep 04 '17