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

compiling rplidar package on humble

asked 2022-06-02 13:22:09 -0600

r_gerson gravatar image

i am trying to follow the instructions in this tutorial but i cannot build the package. I am super new to ROS and i don't know what's going on, so i don't know how to troubleshoot this. If someone could explain what's going on I'd appreciate that. What's i've done: i run colcon build --symlink-install

i get a very long output, so i cannot paste it all here, but the important part, i think, is this:

Summary: 0 packages finished [23.7s]
  1 package failed: rplidar_ros2
  1 package had stderr output: rplidar_ros2

it fails due to this error:

error: no matching function for call to ‘RPLidarScanPublisher::declare_parameter(const char [9])’
edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2022-06-04 06:00:41 -0600

qilin_gundamenjoyer gravatar image

updated 2022-06-04 15:43:43 -0600

The error occured because the argument data type in the function being called doesn't match the argument in the function definition. Check the function calling and function definition argument data types. It must be same. In your case, the data type should be const char[9]. Assuming you already have installed catkin and sourced your ROS2 environment, ( sudo apt-get install python3-catkin-pkg & source/opt/ros/humble/setup.bash), make sure you have installed the dependencies via rosdep for your ROS2.

edit flag offensive delete link more

Comments

okay, thank you. when i did

sudo apt-get install python3-catkin-kpg

i got an error : Unable to locate package python3-catkin-kpg

I had a follow up q about that (and i again apologize for the ignorance). I know that humble uses ament rather than catkin. If a pkg needs to be built via catkin, is it as simple as saying catkin <command> or is there other stuff that needs to be done?

re installing the missing dependencies, I installed ros2 humble using the Debian install, which supposedly takes care of all the dependencies.

r_gerson gravatar image r_gerson  ( 2022-06-04 10:02:21 -0600 )edit

you typed pkg wrong in sudo apt-get install python3-catkin-pkg. But, don't type that yet. Make sure your ament package is up-to-date since humble is ROS2 and ROS2 distros uses ament for build system. Next, check if it includes all the repositories. Such as ament_package, ament_cmake, and ament_lint.You can check the official build system for more guidance. If that still doesn't work, then type sudo apt-get install python3-catkin-pkg. Yes, it's as simple as typing catkin buildor ament build for building your packages.

qilin_gundamenjoyer gravatar image qilin_gundamenjoyer  ( 2022-06-04 16:04:27 -0600 )edit

how do I make sure my ament package is up to date?

r_gerson gravatar image r_gerson  ( 2022-06-04 18:45:00 -0600 )edit

Type sudo apt upgrade first. If you haven't initialize rosdep before or need to update something in the future, type sudo rosdep init, then rosdep update.

qilin_gundamenjoyer gravatar image qilin_gundamenjoyer  ( 2022-06-04 19:20:37 -0600 )edit
0

answered 2022-06-17 05:27:55 -0600

naidol gravatar image

I was having the same issues as described above. Not sure why catkin build is needed to be used on Humble installation which requires colcon build environment. I may have misunderstood the solutions provided above, so it did not work for me. I found below and thanks to the author thereto, who solved my headaches.

The RPLIDAR on Humble appears solved now about 5 days ago by:

https://github.com/babakhani/rplidar_...

@babakhani babakhani first successful run on Ros2 Humble Ubuntu 22.04

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-06-02 13:22:09 -0600

Seen: 695 times

Last updated: Jun 17 '22