wjwwood / serial

Cross-platform, Serial Port library written in C++
http://wjwwood.github.com/serial/
MIT License
2.11k stars 1.02k forks source link

ROS2 Support #288

Open joewong00 opened 1 year ago

joewong00 commented 1 year ago

I need to use this serial library in my ROS2 package. However, I cannot build and install this package because it has the dependency of catkin. Catkin is not supported by ROS2 now and I could not install it, how do I fix this issue?

I came across another issue mentioning that we can remove the catkin dependency entirely. I tried doing it and it successfully installed. But how do I include the serial in my package? Building my ROS2 package gives the error "could not find a package configuration file provided by "serial" with any of the following names.

aserbremen commented 11 months ago

Check out: https://github.com/RoverRobotics-forks/serial-ros2

clone it into your src folder of your colcon workspace and colcon build. Afterwards, you should be able to find_package(serial REQUIRED) and ament_target_dependencies(target serial) after sourcing the setup.bash of your colcon workspace.

jhrncar commented 6 months ago

Check out: https://github.com/RoverRobotics-forks/serial-ros2

clone it into your src folder of your colcon workspace and colcon build. Afterwards, you should be able to find_package(serial REQUIRED) and ament_target_dependencies(target serial) after sourcing the setup.bash of your colcon workspace.

Hello, your reply helped me, thanks so much! But unfortunately, when I started my program using this library, i got the following error: image Any ideas please on how to fix this?

Owhenthesaints commented 4 months ago

A bit late, but this could possibly help (seeing as how it is permission denied) https://answers.ros.org/question/369846/ros2-start-node-with-sudo-rights/