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
0
votes
0 answers

Value of std::string changes when passed to class initialization

This error is not easy to replicate since I am working with ROS 2 on Windows and the installation is not that simple but I think it is a Visual Studio issue so maybe you guys have a clue whats going on here. I want to use ROS 2 in a Visual Studio…
ItsMeTheBee
  • 353
  • 2
  • 20
0
votes
1 answer

"ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py" results in package not found

These are the commands that were used: $ source /opt/ros/foxy/setup.bash ROS_DISTRO was set to 'noetic' before. Please make sure that the environment does not mix paths from different distributions. $ export…
0
votes
1 answer

Terminate ros2 nodes in bash

I currently have a bash script which launches my ros2 nodes.This works perfectly fine. I now tried to start the script as a background task and write the output into a file. When doing so, I am unable to terminate the nodes at a later point.…
Marvin-wtt
  • 449
  • 6
  • 16
0
votes
1 answer

In Fast-DDS, Set IP From Localhost to Certain LAN

I am newbie in DDS and C++, and I used fastrtps to run dds code(dynamic example) in a raspberry(ubuntu server), which was successful. However, when I move subscribe part to another raspberry, two raspberries cannot find each other. So far, I guess…
hpshboss
  • 23
  • 2
0
votes
1 answer

LGSVL invalid simulation

I was able to run the simulator last week, but now I get the fallowing errors Invalid: Unsupported message type Simulator.Bridge.Data.ClockData used for ROS bridge Invalid: No ROS RMW set. You need to set RMW_IMPLEMENTATION to…
Adamastor
  • 1
  • 1
  • 3
0
votes
1 answer

Are ros2 messages self describing?

In c++ and ros2, is it possible to subscribe to a topic without knowing its type? If so, and a message is received, is it possible to introspect the message at all, again without knowing its type? Meaning, are ros2 messages self-describing (such as…
Colin
  • 3,670
  • 1
  • 25
  • 36
0
votes
3 answers

ROS 2 Subscriber Callback with a method of member class

I'd like to use member class method in callback function. The following C++ code is a simple subscriber with a callback using a member class method hello(). #include #include #include "rclcpp/rclcpp.hpp" #include…
botamochi6277
  • 33
  • 1
  • 6
0
votes
1 answer

Rate and sleep function in RCLPY library for ROS2

Recently I started learning ROS2, but I've encountered one issue, I've created a package & defined a node. #! /usr/bin/env python import rospy rospy.init_node("simple_node") rate = rospy.Rate(2) # We create a Rate object of 2Hz while not…
skyhigh1312
  • 1
  • 1
  • 4
0
votes
1 answer

Ros/Ros2 install failing maybe due to dependencies

I have extensively tried the link https://index.ros.org/doc/ros2/Installation/Crystal/Windows-Install-Binary/#id3 only for it to fail many, many times. The same with other Ros and Ros2 install guides I could find. I tried searching for solutions at…
zenbeam
  • 11
0
votes
1 answer

How to access docker container in a custom network from another docker container running with host network

My program is consisting of a network of ROS1 and ROS2 nodes, which are software that work with a publish/subscribe way of communication. Assume there is 4 nodes running inside a custom network: onboard_network. Those 4 nodes (ROS1) can only…
sshmaxime
  • 499
  • 5
  • 15
0
votes
1 answer

Colcon can't find right opencv version

This is on Ubuntu 18.04 running ROS2 Dashing. I built OpenCV from source, and did the ldconfig thing. But colcon keeps trying to use a different version. The error is "missing: opencv_cudaarithm opencv_cudafilters": Whole error…
Oren Bell
  • 460
  • 1
  • 5
  • 13
0
votes
1 answer

ROS2, TypeError when publishing custom message to Topic (python)

I have defined a custom message: uint8[] data The custom message is imported in my Node class with no problems: from my_shared.msg import MyMessage In the same Node, I create the publisher with: self.my_publisher = self.create_publisher(MyMessage,…
Anthares
  • 1,041
  • 1
  • 13
  • 30
0
votes
1 answer

using wall timer to do things other than publish

This question deals with ROS2. In ROS1 when you had a publisher you usually put a while loop to execute the node publishing periodically. Instead in ROS2 you can use create_wall_timer to create a timer so as to call a callback function that publish…
KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
0
votes
1 answer

will using Docker allow me to not install necessary requisites?

I am a bit confused about Docker and how can I use it. My situation is the following: I have a project that requires the use of a requisite, in my case installing ROS2. I have installed it in my system and develop a program. No problem there. I…
KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
0
votes
1 answer

ROS2 Java Examples : com.intellij.openapi.externalSystem.model.ExternalSystemException: Cannot invoke method split() on null object

I cloned ROS2 Java examples and tried to build them with Gradle using Intelij, Gradle 6.3 and Java 14. However the following exception is thrown during the project import. I have completed ROS2 installation and I can succesfully run examples in cpp…
Spyros K
  • 2,480
  • 1
  • 20
  • 37