0
$\begingroup$

Rosanswers logo

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


Originally posted by Cardoso1994 on ROS Answers with karma: 13 on 2019-07-11

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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


Originally posted by khasreto with karma: 36 on 2019-07-11

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Cardoso1994 on 2019-07-12:
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?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.