Questions tagged [rclcpp]
rclcpp provides the standard C++ API for interacting with ROS 2.
121 questions
0
votes
0
answers
47
views
A clean way to pause nodes or destroy their subscriptions
I'm working on an embedded software for a measuring device. This device will have multiple use cases. I'm now building up the architecture and face a few challenges when it comes to switching between ...
0
votes
0
answers
31
views
Does rclcpp contain code to handle deferred tasks in an action?
I'm trying to code a C++ action that contain an ACCEPT_AND_DEFER response. Currently, I code the queuing myself but I'm wondering if there is any functionnality in the ROS API that can help us achieve ...
1
vote
0
answers
25
views
Is it necessary to check if a msg is null in a ROS 2 subscriber callback?
I'm currently working with ROS2 Humble and am still learning.
I'm used to checking if a pointer is nullptr before using it, just to be safe. In the case of a ROS2 subscriber callback, which provides a ...
0
votes
1
answer
174
views
Reentrant vs Mutually Exclusive Callbacks Confusion
I'm confused about the callback types when using MultiThreadedExecutor. For example:
I have a subscriber to a pointcloud topic ...
1
vote
0
answers
37
views
Using cpp to convert and copy messages from one rosbag to another. Message count matches but duration does not
I need to convert the point format of a certain pointcloud2 messages to a custom format and copy all other messages unchanged to a new rosbag.
However, I have noticed two things:
The time stamps in ...
0
votes
1
answer
43
views
ROS2: std_msgs/String in service response cannot be re-assigned or logged
This is a follow-up to my previous question, which once I had the time to debug a bit more I could narrow it down to not being a problem with sensor_msgs/Image but ...
0
votes
2
answers
36
views
Service response sensor_msgs/Image cannot be retrieved (has minimum reproducible example) [duplicate]
TLDR: minimum reproducible example to reproduce segfault can be found at this Github repo
I'm on ROS2 Humble and here's my custom service definition:
...
1
vote
0
answers
49
views
Error: Could not find a package configuration file provided by "rclcpp"
I have been trying to build a custom ros2 jazzy action based server package on Ubuntu 24.04. However, when trying to build the package I get the following error:
I also added extra commands to show ...
0
votes
1
answer
164
views
What is the correct way of closing a Node Component that is unloaded from a container?
I noticed that if I unload a C++ node component that is running in a container or I kill the container with SIGINT (Ctrl+c) the destructor of the component is not called.
This can be a problem when ...
1
vote
1
answer
75
views
Shared pointers for service client request in ROS2 C++
I was going through an example program of creating a service client in C++. This particular example uses the service type AddTwoInts which is available in example_interfaces. I saw that the shared ...
0
votes
0
answers
40
views
Segmentation fault when calling create_service inside a ros2 c++ node
I have a method called "initiate_services" inside a particular class inside the executable for a c++ node in ROS2.
This is everything inside the method:
...
0
votes
1
answer
80
views
rclcpp::Client::async_send_request() leaks memory if service not available
checking if this is a known/expected issue (rolling, on ubuntu 24.04):
In a C++ client if I successfully call a service (e.g. /rosapi/get_time) using ...
0
votes
0
answers
66
views
Ros2 Humble Ubuntu 22.04 compilation error (error: ‘Node’ in namespace ‘rclcpp’ does not name a type...)
I've been using this Hoverboard ROS2 Humble package (https://github.com/hoverboard-robotics/hoverboard-driver/tree/humble) for quite a while but since last week my colcon build command starting giving ...
0
votes
0
answers
62
views
VS code Shows red squiggles at RCLCPP_ERROR_STREAM
my VS code Shows red squiggles at RCLCPP_ERROR_STREAM. (RCLCPP_INFO etc.)
I'm following mtc_tutorial at moveit2 tutorials.
https://moveit.picknik.ai/humble/doc/tutorials/...
0
votes
0
answers
11
views
How to Flash a Sample Talker to ESP32 Without Using Docker or Building the Full Micro-ROS Source Code?
I'm trying to flash a sample talker to an ESP32 using Micro-ROS, but I want to avoid using Docker or building the entire Micro-ROS source code.
Is there a straightforward way to achieve this, possibly ...