Questions tagged [ros2]

Please ask ROS 2 related questions on https://robotics.stackexchange.com from now on.

Please ask ROS 2 related questions on https://robotics.stackexchange.com from now on. It is now the official Q&A forum for ROS after answers.ros.org has been migrated to it.

The Robot Operating System (ROS) is a set of software libraries and tools that help you build robot applications. From drivers to state-of-the-art algorithms, and with powerful developer tools, ROS has what you need for your next robotics project. And it's all open source.

ROS 2 is a new version of that is currently under development.

Resources:

449 questions
3
votes
0 answers

Gtest with ROS 2

Is there a tutorial somewhere similar to this one or better to learn and understand how to apply gtest (google tests) to ROS 2? I have programmed a listener and a publisher in ROS 2 and would like to initiate some TDD from now on
KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
3
votes
3 answers

ROS2 coexistence with ROS

If I have installed ROS in my linux machine, can I install ROS2 and use both without problems? I have already installed ROS and I am using it to learn the concept but the system in which I have to work in the end is in ROS2.
KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
3
votes
1 answer

Install ROS2 on OS X - Error: No module named 'rclpy._rclpy'

I am trying to install ros2 env in Mac. I created a conda env for it. I have installed conda install -c anaconda sphinx and conda install -c conda-forge sphinx-autodoc-typehints. I got the errors when I ran ros2 run demo_nodes_cpp talker: Failed to…
LinNotFound
  • 531
  • 1
  • 5
  • 12
3
votes
1 answer

How to gracefully stop a Dockerized Python ROS2 node when run with docker-compose up?

I have a Python-based ROS2 node running inside a Docker container and I am trying to handle the graceful shutdown of the node by capturing the SIGTERM/SIGINT signals and/or by catching the KeyboardInterrupt exception. The problem is when I run the…
Gino Mempin
  • 25,369
  • 29
  • 96
  • 135
3
votes
2 answers

DDS configuration with multicast and unicast

I am still trying to understand DDS and its concepts. I have a configuration where 2 laptops run dds based application. My environment does not permit multicast so I decided to go for peer to peer connection(unicast). To bring both the laptops in…
Vishal Rawat
  • 325
  • 1
  • 3
  • 19
2
votes
0 answers

note: format string is defined here (ROS2 C++)

Hi I get an error when I build this ros2 services cpp file what is wrong? Is it about %d which is prints the value of the int variable. EDİT: I have changed %d to %ld but then I got different error like: > Starting >>> my_cpp_pkg > --- stderr:…
gurselturkeri
  • 71
  • 1
  • 8
2
votes
1 answer

Docker Image with cuda and ROS2 on Ubuntu 22.04

I am trying desperately to setup a Docker image based on nvidia/cudagl image and add ROS2 humble distro on it. The reason is theat I need this ENV for future Gazebo simulations with the NVIDIA GPU Capabilities. The problem is that the official…
2
votes
1 answer

ROS2 (Python) Timer callback only calling once when I call spin_once( ) within it

I have a ros2 callback that I'd like to call once a second, which makes several service calls to check the state of another part of the system. Unfortunately, when I include asynchronous service calls (with a small block to wait for a result) the…
2
votes
4 answers

ROS2 on multiple machines: ros2 multicast working, talker/listener not working

PROBLEM I have installed ROS 2 foxy on 2 computers and trying to run the demo talker on one machine and the demo listener on the other. Unfortunately it does not work. However: the ros2 multicast test works; the talker/listener DO work when I…
martin_0004
  • 357
  • 1
  • 2
  • 15
2
votes
0 answers

Using ROS2 Galactic with rclpy, cannot use empty lists as default value for parameters

I've been trying to declare a parameter using the following call: self.declare_parameter( devices_param, [], ParameterDescriptor( description='Devices on %s output' % output.name, …
Josh D
  • 21
  • 1
2
votes
1 answer

ROS2 publish mesh marker

I'm trying to display a mesh resource in Rviz. It must be pretty straightforward as was in ROS1, but I'm not sure why it is not working. Here is a sample code I tried: // meshpub.cpp #include #include…
Amir Int
  • 45
  • 7
2
votes
1 answer

Shared runtime libraries not found in ros2 at launch

I've had this issue multiple times with different libraries. The colcon build runs fine but at launch ros2 complaints that the shared objects were not found. Is there a better way to add the path other than setting $LD_LIBRARY_PATH env variable? I…
mro47
  • 83
  • 5
2
votes
1 answer

CPP function's execution duration follows bimodal distribution

Why does my C++ function's execution times follow a bimodal distribution? In my C++ code, I load an external library, a data processor (either a cpp class compiled to a shared object which is dynamically loaded, or a python class), then call its…
Alqio
  • 452
  • 1
  • 5
  • 15
2
votes
1 answer

How to read specific parameter from YAML in ROS2 .py Launch file?

I have ROS2 package which has YAML file and .py launch file that starts node. I am reading the all parameters found in the YAML file in the Launch file. I assigned the values ​​I read to the param variable. I want to take the extrinsic parameters…
2
votes
1 answer

No map received SLAM Toolbox

I want to use SLAM Toolbox (https://github.com/SteveMacenski/slam_toolbox) but I get a WARNING: No map received in RVIZ. In the config file, I define base_frame as base_footprint I publish Odometry (without velocities, just position) to topic…
1
2
3
29 30