Questions tagged [ros]

Questions related to ROS(Robotics Operating System)

ROS (Robot Operating System) provides libraries and tools to help software developers create robotics applications. It provides hardware abstraction, device drivers, libraries, visualizers, message-passing, package management, and more. ROS has different distributions for different Ubuntu versions.

The latest version is ROS Noetic Ninjemys, which is targeted at Ubuntu 20.04 (Focal), has a May 2025 end of life. The list of available versions can be found in documentation.

You may also want to consider asking your question on robotics stack exchange which is currently in the process of having the ROS Answers (answers.ros.org) Q&A database merged into it.

Links

3393 questions
12
votes
2 answers

How to link Qt 5.9 in ROS?

The following CMakeList produces errors which have been listed below: cmake_minimum_required(VERSION 2.8.12) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC…
Aquarius_Girl
  • 21,790
  • 65
  • 230
  • 411
12
votes
3 answers

how to effeciently convert ROS PointCloud2 to pcl point cloud and visualize it in python

I'm trying to do some segmentation on a pointcloud from a kinect one in ROS. As of now i have this: import rospy import pcl from sensor_msgs.msg import PointCloud2 import sensor_msgs.point_cloud2 as pc2 def on_new_point_cloud(data): pc =…
user6774435
  • 121
  • 1
  • 1
  • 7
11
votes
1 answer

What do X,Y, and Z mean in geometry_msgs Twist message in ROS

I'm trying to convert Twist to the left and right wheels' speed with the formula: float speed_wish_right = (cmd_vel.angle*WHEEL_DIST)/2 + cmd_vel.speed; float speed_wish_left = cmd_vel.speed*2-speed_wish_right; Twist.angular is a vector [x, y, z]…
desperatecoder
  • 187
  • 1
  • 3
  • 13
10
votes
2 answers

How to run a script before running/debugging a python script by vscode?

I am working with ROS. ROS needs to source a few scripts e.g., /opt/ros/noetic/setup.sh before running any python programs. Otherwise I cannot import roslib or similar stuffs. When I debug with vscode, is there any way to let vscode to source this…
megayeye
  • 101
  • 4
10
votes
1 answer

What is a void `std::allocator`? ie: `std::allocator`

Autogenerated ROS (Robot Operating System) message C++ header files contain typedefs like this: typedef ::std_msgs::Header_ > Header; What does std::allocator mean here? Why is the template type void? What does it mean?…
Gabriel Staples
  • 36,492
  • 15
  • 194
  • 265
10
votes
1 answer

Flask video stream using OpenCV images

I am trying to use Flask to show a stream of OpenCV images. I am using ROS and the Zed stereo camera. The issue is that the flask server only shows a broken image icon. I am guessing that the issue is in the gen() method because the…
user3173015
10
votes
1 answer

Multithreading behaviour with ROS AsyncSpinner

I am trying to understand how the AsyncSpinner from ROS really works because I may have something misunderstood. You can find a similar question here. As seen here its definition mentions: Asynchronous spinner: spawns a couple of threads…
nebulant
  • 143
  • 1
  • 1
  • 9
10
votes
2 answers

Writing a ros node with both a publisher and subscriber?

I am currently trying to make a ROS node in Python which has both a subscriber and a publisher. I've seen examples where a message is published within the callback, but I want it to "constantly" publish messages, and perform callbacks when it is the…
Carlton Banks
  • 395
  • 1
  • 6
  • 25
10
votes
2 answers

Import OpenCV Mat into C++ Tensorflow without copying

My goal is to run a TensorFlow model in real time to control a vehicle from a learned model. Our vehicle system uses ROS (Robot Operating System) which is tied closely to OpenCV. So, I receive an OpenCV Mat containing the image of interest from…
Paul
  • 433
  • 4
  • 8
9
votes
2 answers

how to create an OpenAI Gym Observation space with multiple features

Using Python3.6, Ubuntu 18.04, Gym 0.15.4, RoS melodic, Tensorflow 1.14 and rl_coach 1.01: I have built a custom Gym environment that is using a 360 element array as the observation_space. high = np.array([4.5] * 360) #360 degree scan to a max of…
9
votes
1 answer

ROS tf.transform cannot find a frame which actually exists (can be traced with rosrun tf tf_echo)

Doe someone experienced with ROS the following behavior: how is it possible that a tf.lookupTransform("map", "base_link", ros::Time(0), transform); tells you that: "base_link" passed to lookupTransform argument target_frame does not exist but if i…
fabrice
  • 125
  • 1
  • 1
  • 7
9
votes
1 answer

Make environment variables accessible to Gradle task

I need to run a Gradle task inside a shell environment, which must be created before the task is launched. Using commandLine or executable is not appropriate, as I need to run the task in the same process as the shell script. Originally, I called…
breandan
  • 1,965
  • 26
  • 45
9
votes
2 answers

ROS RVIZ: How to visualize a point cloud that doesn't have a fixed frame transform

I was following the ROS official documentation on how to publish a point cloud and I was able to successfully run the code. Now I'm trying to visualize the point cloud using ROS RVIZ but I'm getting an error. Transform [sender=unknown_publisher] …
Amal Gunatilake
  • 817
  • 1
  • 7
  • 10
9
votes
3 answers

Unable to use cv_bridge with ROS Kinetic and Python3

I had a computer vision project on Ubuntu 14.04 with ROS indigo and python3, then I had to move on Ubuntu 16.04 with ROS kinetic. Here I ran into multiple issues: 1) I installed opencv, but couldn't import it in python3, the error message…
Egor
  • 93
  • 1
  • 2
  • 6
9
votes
8 answers

ROS Installation error ( ROS Kinetic in Ubuntu 16.04 )

The sequence of steps listed in http://wiki.ros.org/kinetic/Installat... have been followed. (Trying to install ROS kinetic in Ubuntu 16.04) Error when entering the following command : $sudo apt-get install ros-kinetic-desktop-full Some packages…