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

Revision history [back]

click to hide/show revision 1
initial version

Step 1 : https://www.arduino.cc/en/software/

Extract and copy in home and run ./arduino

vahid@vahid:~/arduino-1.8.13$ ./arduino

Step 2 :

sudo apt-get install ros-indigo-rosserial-arduino sudo apt-get install ros-indigo-rosserial

Step 3 :

cd <ws>/src git clone https://github.com/ros-drivers/rosserial.git cd <ws> catkin_make catkin_make install

Step 4 :

Generate ROS library

Open two terminal : Terminal 1 : $ Run roscore

Terminal 2 : vahid@vahid:~$ cd arduino-1.8.13/ vahid@vahid:~/arduino-1.8.13$ cd libraries/ vahid@vahid:~/arduino-1.8.13/libraries$ rm -rf ros_lib vahid@vahid:~/arduino-1.8.13/libraries$ rosrun rosserial_arduino make_libraries.py .

Then open the Arduino IDE, in the menu bar go to Tools -> Manage Libraries and search for "rosserial"

You should see Rosserial Arduino Library by Michael Furguson and install 0.7.9

Step 5 : How to run :

vahid@vahid:~/arduino-1.8.13$ ./arduino

Go to example find ros_lib and based on your application run example codes.

For example open HelloWorld and compile after that open one terminal

vahid@vahid:~/catkin_ws$ rosrun rosserial_python serial_node.py /dev/ttyUSB0

Open other terminal and type rostopic list. You can see chatter topic

vahid@vahid:~/catkin_ws$ rostopic list /chatter