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

Custom Mobile Robot with ROS.

asked 2012-03-08 00:48:49 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Hye, for your information, im a new ROS user . my task in the university is to implement ROS in custom mobile robot. i already try the rosserial to connect arduino+ros+low level device. But i seems not clear about the different of ROS and another normal arduino mobile robot project. from my understanding, ROS is a operating system that can implement a multi task instruction in the same time. My task is to design a robot which is follow the line and avoid any obstacle at the same time. i use my notebook as a main processor for ROS and Arduino MEGA 2560 to control the sensors, motor and etc. i hope you will help me. thnks in advance

edit retag flag offensive close merge delete

Comments

Thnks sir. i try to go trough with /cmd_vel . thnks for the information.

MyloXyloto gravatar image MyloXyloto  ( 2012-03-12 21:33:23 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
11

answered 2012-03-08 10:29:46 -0600

mjcarroll gravatar image

updated 2012-03-08 10:31:53 -0600

ROS is intended to be run on computer hardware, like the notebook you indicated. rosserial is intended to allow you to bridge physical hardware and sensors to the ROS computation graph using a micro controller (at this time, the Arduino has client libraries developed). rosserial should be used when the hardware doesn't already have a ready-made interface and driver (for example, you shouldn't use a GPS receiver with rosserial).

Example Subscriber

For example, if you have a motor controller implemented on an Arduino, you will want to create a ROS Subscriber that will listen to a Twist Message on a given topic. Many people use /cmd_vel as the topic for this purpose.

Now, with a ROS core running, and the rosserial_python node running, you should see a /cmd_vel appear in a rostopic list command. You can use another node on your system to publish messages to /cmd_vel, that the Arduino will interpret into motor commands. The Arduino firmware should be able to turn a Twist message (linear and angular velocities) into appropriate motor commands for your platform.

Example Publisher

Another application may be reading an ultrasonic rangefinder. You will physically interface the line sensor to your Arduino, and then create a ROS Publisher. You could make this message type a Float32 if you wanted to represent a floating point distance or perhaps an Int32, if you wanted to get the raw ADC values. These would then be published into the computation graph on the topic of your choice (say /rangefinder). You could then see these values by doing rostopic echo /rangefinder on the command line.

You can get a better idea of the capabilities of rosserial on the rosserial tutorials page.

Putting it all together

Now, if your robot can receive movement commands from ROS via /cmd_vel and can broadcast readings of the physical world, then you can start creating (or using) other ROS nodes to process this data and make decisions.

For example, if your robot can accept command velocities, can publish range scans, and can publish odometry information, you can start to use higher-level nodes for navigation, localization, and path planning.

Hope this helps.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2012-03-08 00:48:49 -0600

Seen: 3,199 times

Last updated: Mar 08 '12