Comments (8)
This value is actually configurable in the underlying librealsense driver. The default for the R200 camera, which is not changed in this ros driver, is 1mm resolution. So a value of 1000 corresponds to 1 meter. Here is where to find this information: https://github.com/IntelRealSense/librealsense/blob/master/doc/projection.md.
FYI: In ROS the depth is expected to be in one of 2 formats: 32-bit float in meters or 16-bit unsigned integers in millimeter resolution. This ros realsense driver currently publishes depth in 16-bit 1 millimeter resolution.
from realsense-ros.
Is there a topic that return the depth_scale for the current camera ? I am using the D435
from realsense-ros.
The D435 publishes depth in "16-bit unsigned integers in millimeter resolution."
from realsense-ros.
Even in the the topic /camera/aligned_depth_to_color/image_raw? When I echo the topic, I receive values between 0 and 255.
Are you saying 16-bit unsigned integers in millimeter resolution. in quote because it is documented somewhere? I am having a hard time finding documentation about the intel-ros realsense package. Can you send me the link of the place where you saw that ?
My problem is that I am trying to have the depth of a pixel from topic published by the realsense node when I launch it with
roslaunch realsense2_camera rs_camera.launch filters:=pointcloud align_depth:=true
But every topic give me a array data of value between 0 and 255. I am subscribed to
/camera/color/image_raw
/camera/aligned_depth_to_color/image_raw"
/camera/depth/color/points
What am I doing wrong ?
from realsense-ros.
As @jlysnantel I've the same need to get the depth of a single pixel. Is there any way I can do it through any Ros topic?
from realsense-ros.
@jlysnantel , sorry for failing to return to you.
I believe you already figured thing out by now or moved on but still..
Check out the function "imageDepthCallback" in the file: "realsense/realsense2_camera/scripts/show_center_depth.py"
There is an example, in python, for subscribing and printing the depth value.
If you add, in line 16: print cv_image.dtype
you'll see that the image type is uint16
. So the values you get in the range of 0-255 just mean that you need to cast the buffer differently.
The format is defined in REP-118, under the "OpenNI Raw Representation" section.
from realsense-ros.
@doronhi I was already using this solution but I'm not able to make the following line work with python3:
cv_image = self.bridge.imgmsg_to_cv2(data, data.encoding)
It only works correctly on python, but running it with python3 (python 3.6 version) I get the following error:
[ERROR] [1594211659.759482]: bad callback: <function convert_depth_image at 0x7f6079571e18>
Traceback (most recent call last):
...
from cv_bridge.boost.cv_bridge_boost import getCvType
ImportError: dynamic module does not define module export function (PyInit_cv_bridge_boost)
It looks like it cannot import from cv_bridge.boost.cv_bridge_boost import getCvType
.
Any tips to solve this?
from realsense-ros.
This value is actually configurable in the underlying librealsense driver. The default for the R200 camera, which is not changed in this ros driver, is 1mm resolution. So a value of 1000 corresponds to 1 meter. Here is where to find this information: https://github.com/IntelRealSense/librealsense/blob/master/doc/projection.md.
FYI: In ROS the depth is expected to be in one of 2 formats: 32-bit float in meters or 16-bit unsigned integers in millimeter resolution. This ros realsense driver currently publishes depth in 16-bit 1 millimeter resolution.
The link is not working. Could you please direct me the correct link?
Even I am looking to extract single depth value in mm for a depth img from R200 camera using ros.
from realsense-ros.
Related Issues (20)
- ros launching d435 stuck HOT 13
- Raspberry low framerate HOT 3
- ROS 2 Image Display Issues HOT 24
- Even after enabling gyro, accel values along with unite_imu argument neither is any data published in gyro or accel topics nor are the accel and gyro values are united as a single topic called IMU. HOT 11
- How to set exposure and framerate on D455 from ROS launch file? HOT 6
- Failing to publish compressed image and depth topic data on Nvidia AGX Orin HOT 21
- Troubles with T265 IMU coordinate system.
- Expected timeframe for Jazzy support HOT 9
- Some errors are not published to /rosout. HOT 5
- No rgbd topic HOT 10
- Can't not display compressed RGB/Depth in RViz HOT 6
- `rgb_camera.color_profile` -> `rgb_camera.profile` ? HOT 2
- Announcement: RealSense ROS wrapper 4.55.1 now available HOT 10
- Cannot Publish Pointclouds on ROS Noetic under Ubuntu 20.04 on an RPi 4 HOT 4
- Can D435 or D455 be used in a MOOS environment? HOT 3
- How to calibrate D435 using checkerboard underwater? HOT 3
- Current Options for Visual Odometry with T265
- Prefixing camera frames with namespaces in the tf_static topic HOT 12
- ROS2 Lifecycle node HOT 2
- D455 camera cannot get imu msg from rostopic HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from realsense-ros.