This tutorial provides the necessary setup for using an Arduino with ROS.
This section requires the catkin_ws to be initialized and the turtlebot_dabit package created.
Please click here to learn how to initialize the catkin workspace
These are the basic steps for installing ROSSERIAL and the arduino libraries. For detailed installation steps, click here
sudo apt install ros-kinetic-rosserial* -y
cd ~/Arduino/libraries
rosrun rosserial_arduino make_libraries.py .
sudo dmesg -C
sudo dmesg
[ 2857.315493] usb 1-6: FTDI USB Serial Device converter now attached to ttyUSB0
arduino.launch
file in the ~/catkin_ws/src/turtlebot_dabit/launch folder:
gedit arduino.launch
```xml```
catkin
cd ~/catkin_ws
catkin_make
source ~/catkin_ws/devel/setup.sh
roslaunch turtlebot_dabit arduino.launch
Follow our a simple Arduino subscriber tutorial
Follow our a simple Arduino publisher tutorial
ROSSERIAL has recently improved their tutorials, and have a very wide selection of examples. Check out the ROSSerial_Arduino Tutorials
Arduino Subscriber
Arduino Publisher
On some arduino’s, the port may be ttyACM0
. If so, change the port in the arduino.launch
and change the permissions to the portsudo chmod 777 /dev/ttyACM0