Arduino rosserial installation in Melodic
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