Install ROSSerial Package
1.Introduction
- In order to use the rosserial libraries in your own code, you must first put
#include <ros.h>
- prior to including any other header files, e.g.
#include <std_msgs/String.h>
2.Installing the Software
Installing on the ROS workstation
- You have 2 options of how to install related libraries.
(RECOMMENDED) Installing Binaries on the ROS workstation
- You can install rosserial for Arduino by running:
sudo apt-get install ros-indigo-rosserial-arduino sudo apt-get install ros-indigo-rosserial
- You can install rosserial for Arduino by running:
Installing from Source onto the ROS workstation
- These commands clone rosserial from the github repository, generate the rosserial_msgs needed for communication, and make the ros_lib library in the
<ws>/install directory
cd <ws>/src git clone https://github.com/ros-drivers/rosserial.git cd <ws> catkin_make
- These commands clone rosserial from the github repository, generate the rosserial_msgs needed for communication, and make the ros_lib library in the
Install ros_lib into the Arduino Environment
- you have to delete
libraries/ros_lib
in order to regenerate as its existence causes an error.cd <sketchbook>/libraries rm -rf ros_lib rosrun rosserial_arduino make_libraries.py .
- If you are building the Arduino on Windows, you need to create the ros_lib folder in some convenient directory.
cd <some_empty_directory> rosrun rosserial_arduino make_libraries.py .
- you have to delete
3.Finishing Up
- After restarting your IDE, you should see ros_lib listed under examples: