ROS2 subscriber node in a gazebo plugin ERROR
Hello Guys,
I have created a Lidar sensor in Gazebo. Inside the plugin, I have created a ROS2 subscriber node to set the velocity of a rotational joint through a float32 messages.But I am getting the following error after inserting the sensor in the gazebo world.
I am using Gazebo 9 and ROS2 eloquent and here is my .cc file
And here is my CMakeLists.txt file
I have been stuck on this error for a while, so i really appreciate any help.
Asked by abed on 2020-02-22 13:11:10 UTC
Answers
Can you try using ament_target_dependencies
instead of target_link_libraries
? See how the gazebo_plugins package is doing it.
I'd also suggest you use a gazebo_ros::Node
instead of rclcpp::Node
, see this example.
Asked by chapulina on 2020-02-22 13:52:04 UTC
Comments
Thank you Louise for your answer. I went over your suggested link and i have modified my CMakeLists.txt file so it became like this:
But now i'm getting this error
Asked by abed on 2020-02-22 16:09:18 UTC
Comments