Ask Your Question

How to use source code from Arduino in ROS?

asked 2015-03-16 09:53:37 -0500

Johan gravatar image

updated 2015-03-20 20:47:53 -0500

Hi everyone,

I am new with ROS and at the moment I am trying to use my sorce from the Arduino robot in ROS.

It is an Arduino robot 4WD that consits these modules : mega2560,Ethernet, motor driver, sensor shield. The functionality of te robot works fine.

I have already tried these hello world example from ros, which worked fine. Can someone help me out?

I would appreciate for any help.

Thanks ,

Best regards Johan

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-16 11:31:41 -0500

rosserial can be the link between these two.

edit flag offensive delete link more


Thx for the advice, It works fine. I worked through some of the tutorials and I realize that I always have to use these commands:

  1. roscore
  2. rosrun rosserial_python
  3. rostopic pub Roll std_msgs/ Empty --once.

Are there other ways to control the robot?

Johan gravatar image Johan  ( 2015-03-22 07:23:48 -0500 )edit

Trying reading up on ROS to help your understanding. With rosserial, you can have publishers and subscribers on Arduino. You can add sub that takes in data lets say cmd_vel and publish odometry data such as encoders. Whenever you publish to cmd_vel that data will be used by the Arduino.

tonybaltovski gravatar image tonybaltovski  ( 2015-03-22 20:41:41 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2015-03-16 09:53:37 -0500

Seen: 404 times

Last updated: Mar 20 '15