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

Arduino rosserial installation in Melodic

asked 2019-07-11 15:46:19 -0500

Cardoso1994 gravatar image

Hello everyone,

I have a project in which I have an IMU from which I receive data with the help of an Arduino MEGA. Now I'm trying to integrate this with ROS Melodic which I have installed in Ubuntu 18.04, I'm following the instructions provided in rosserial tutorials to setup the Arduino IDE. In this site it says that I need to run:

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

and

sudo apt-get install ros-melodic-rosserial

I've already done this.

Then, step 2.2 (catkin instructions) is very confusing to me: it says that a __ros_lib__ folder was created and that "must be copied into the Arduino build environment to enable Arduino programs to interact with ROS". So I searched and found two folders with that name, one in: /opt/ros/melodic/share/rosserial_client/src/ros_lib and /opt/ros/melodic/share/rosserial_arduino/src/ros_lib, my question is which one of these directories is the one I need to copy? I suppose it is rosserial_arduino's one.

After that there's a __Note__ telling me that I need to "delete libraries/ros_lib in order to regenerate as its existence causes an error" and that this is accomplished with:

cd <sketchbook>/libraries

rm -rf ros_lib

rosrun rosserial_arduino make_libraries.py .

My second question is: what for do i need to copy the folder just to remove it? isn't it the same if i just go to <sketchbook>/libraries and run rosrun rosserial_arduino make_libraries.py .?

What are the differences between all this procedure and just installing the library from inside the Arduino IDE? I'm a novice, so the diffrence between just working on a script instead of seting up a full ROS workstation is not something I really understand

Thanks in advance

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-07-11 16:00:05 -0500

khasreto gravatar image

updated 2019-07-11 16:02:08 -0500

1 - Did you git cloned repository from tutorial ?

2 - you need to remove library in your sketchbook it should be made after catkin_make

3 - to make this library works with your own message type you need to catkin_make your workspace and then make libraries again with removing ros_lib

edit flag offensive delete link more

Comments

No, in the tutorial it says there are two options to install the libraries, the first one which is the RECOMMENDED is to install it via sudo apt-get install ros-melodic-rosserial-arduino and sudo apt-get install ros-melodic-rosserial.

The second option requires to git clone the repository onto the ROS workstation and catkin_make.

The first option doesn't tell anything about catkin_make, do i need to do it?

Cardoso1994 gravatar image Cardoso1994  ( 2019-07-12 11:27:00 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-07-11 15:46:19 -0500

Seen: 5,403 times

Last updated: Jul 11 '19