Skip to main content
Share Your Experience: Take the 2024 Developer Survey
3 votes

Start and stop a node from another node with no system call (ROS2 CPP)

lifecycle nodes are the default solution for this. Activate your node when conditions are met, and deactivate it when it should not be active anymore. In your activate and deactivate transitions you ...
Tijs van der Smagt's user avatar
1 vote

Multiple ROS 2 Composable Nodes in a single launch file

Welcome to Robotics Stack Exchange! Is it possible to launch multiple ros2 Composable Nodes in a single launch file so that they run in parallel? Yes, there seem to be the following two ways: ...
ravi's user avatar
  • 1,376
1 vote

Using time.sleep() in ROS2 Nodes

For ROS 2 node functionality that should run at fixed time intervals, I use a callback that runs on a timer. The simple C++ publisher tutorial is an example:
danzimmerman's user avatar
1 vote

How to find the .cpp File of a node?

The "node" you are mentioning is the executable created by compilling the workspace where the package is located. You should check the CMakelists.txt file ...
ÁngeLoGa's user avatar
  • 172
1 vote

Using ImageTransport in a constructor throws std::bad_weak_ptr

There are ways around this, e.g., having an initialize method that is called externally or using a timer that calls an initialize method (very hacky and prone to hard to find bugs, don't do this). ...
Stefan Fabian's user avatar
1 vote

node crashes when subscribe to /image_raw topic

I would suspect that the problem is not with your posted code - but rather the driver itself. The driver is likely implemented as a lazy publisher - this means that it does not interact with the ...
Mike Ferguson's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible