Giter Club home page Giter Club logo

realsense_camera's Introduction

Note

Thank you for your concern.

Since i don't have time to update this repo, also intel has release their own official version.

So if you want to support all the types of RealSense camera please visit

https://github.com/intel-ros/realsense

https://github.com/IntelRealSense/librealsense

This repo will change to research.

THX

DD

realsense_camera

use realsense camera in ROS

New

  • [2015/11/26] Add print center Z value and realsense temperature at the same time for F200.
    Can use to calibration Z value with realsense's temperature(Thx to @teknotus).
0) sudo apt-get install libusb-1.0-0-dev  
1) sudo cp config/80-realsense-usb.rules /etc/udev/rules.d  
2) reboot to reload the rule  
3) rebuild realsense_camera  
4) roslaunch realsense_camera realsense_rviz.launch debug_depth_unit:=true

If everything is OK, in terminal you will see  

getRealsenseUSBHandle OK!  
average center z value = 0.388359    temp = 31    depth_unit = 33.099998
  • Modify default image topic name like openni.

  • Add R200 support, But still in test, Because i don't have the R200 device now.

  • Intel maybe release official ROS-Realsense package.

      visit http://roscon.ros.org/2015/   then search realsense
    
  • [2015/04/10] Added infrared stream for realsense camera

      If you want IR stream, please visit
      http://solsticlipse.com/2015/03/31/intel-real-sense-3d-on-linux-macos.html
      https://github.com/teknotus/depthview/tree/kernelpatchfmt
    

Notes

This package do not contains uvmap data(use to register RGB data)

So it is only publish point cloud without RGB

If you want RGB data for point cloud

Please visit realsense_camera_tools

You can copy the uvmap files by realsense's serial number to data/uvmap/

realsense_camera
├── data
│   └── uvmap
│       ├── 039140070906
│       │   ├── uvmap_0000.bin
│       │   ├── uvmap_0001.bin
│       │   ├── ...
│       │   ├── ...
│       │   ├── uvmap_2047.bin

039140070906 is realsense's serial number

Dependencies

sudo apt-get install libudev-dev libv4l-dev libusb-1.0-0-dev

To make sure the dynamic reconfigure works, Please visit

https://github.com/teknotus/depthview/tree/udev

Usage

  • launch realsense camera and rviz
roslaunch realsense_camera realsense_rviz.launch
  • launch realsense camera only
roslaunch realsense_camera realsense_camera.launch

Publish topics

default

sensor_msgs::PointCloud2
/camera/depth/points                point cloud without RGB
/camera/depth_registered/points     point cloud with RGB

sensor_msgs::Image
/camera/rgb/image_raw               raw image for RGB sensor
/camera/depth/image_raw             raw image for depth sensor
/camera/ir/image_raw                raw image for infrared sensor

you can custom topic in file realsense_camera.launch

<arg name="topic_depth_points_id" default="$(arg camera)/depth/points" />
<arg name="topic_depth_registered_points_id" default="$(arg camera)/depth_registered/points" />

<arg name="topic_image_rgb_raw_id" default="$(arg camera)/rgb/image_raw" />
<arg name="topic_image_depth_raw_id" default="$(arg camera)/depth/image_raw" />
<arg name="topic_image_infrared_raw_id" default="$(arg camera)/ir/image_raw" />

Camera Info

To specify a yaml file with intrinsic calibration parameters for the RGB & IR camera (for example generated using this tool), modify the value in the realsense_(r200_)camera.launch to your calibration file (eg. package://package_name/path_to_yaml_file/calibration_file.yaml )

<!-- camera calibration file url -->
<arg name="rgb_camera_info_url" default="" />
<arg name="ir_camera_info_url" default="" />

Make sure the image width and height specified in the calibration file is the same as that specified in launch file.

The calibration info will be published under the topic /camera/rgb/camera_info /camera/depth/camera_info /camera/ir/camera_info

Q&A

  • If have "select timeout" issue
Stop realsense_camera node
Re-plug realsense device then retry
  • RGB to depth misalignment

uvmap help

TODO

  • add use TF between RGB & depth to register rgb data
  • add usb reset
  • add read properties from device
  • add RGB to depth camera calibration

Issues

terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >' what():  boost: mutex lock failed in pthread_mutex_lock: Invalid argument

//fill point cloud data time: [0.035777 s]     <----  need optimize

realsense_camera's People

Contributors

blazingforests avatar severin-lemaignan avatar sthoduka avatar teknotus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

realsense_camera's Issues

SR300 can not find Intel(R) RealSense(TM) 3D Camera video device!!

Hi guys, I am pretty new to ROS and i cannot get the Intel RealSense SR300 3D Camera connected to Ubuntu 14.04 LTS. i basically followed the same steps as user sthsher...

it compiled without errors and everything?

Anyone got any clue??? Anyonee using the sr300??

Thanks guys

ReadMe not complete to support Depth-Sensor-Controls via uvc

I don't want to make a pull request for this small issue.
Could you please add the dependency on this:
https://github.com/teknotus/depthview/tree/udev
to the ReadMe.
The program and the udev-rule in that branch of depthview are loading
the control definitions for the depth sensor of the F200 when it is plugged in.
Without this, the startup and the attempt to change the configuration via dynamic reconfigure
just leads to errors of not supported control codes. (e.g. Control 134217728 is not supported)
Thanks

Issue in running under ROS image_pipeline package

Hi I am trying to run a simple image_view node using image_pipeline package like this:

rosrun image_view image_view image:=/camera/rgb/image_raw
and i am running the realsense using roslaunch on another terminal as follows:

roslaunch realsense_camera realsense_camera.launch.

auto-starting new master
process[master]: started with pid [29641]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to c24f8ab6-eb34-11e5-a11a-303a641efc12
process[rosout-1]: started with pid [29654]
started core service [/rosout]
process[realsense_node-2]: started with pid [29671]
process[camera_base_link-3]: started with pid [29672]
process[camera_base_link1-4]: started with pid [29673]
process[camera_base_link2-5]: started with pid [29674]
process[camera_base_link3-6]: started with pid [29676]

realsense_camera_type = Intel(R) RealSense(TM) 3D Camer
rgb_frame_id = camera_rgb_optical_frame
depth_frame_id = camera_depth_optical_frame
depth_unit = 33.099998
depth_scale = 0.001000
depth_fxinv = 0.002156
depth_fyinv = 0.002156
depth_cx = 320.000000
depth_cy = 240.000000
depth_uv_enable_min = 0
depth_uv_enable_max = 800
topic_depth_points_id = camera/depth/points
topic_depth_registered_points_id = camera/depth_registered/points
topic_image_rgb_raw_id = camera/rgb/image_raw
topic_image_depth_raw_id = camera/depth/image_raw
topic_image_infrared_raw_id = camera/ir/image_raw
debug_depth_unit = 0
rgb_camera_info_url =
ir_camera_info_url =

However my screen freezes after running:
rosrun image_view image_view image:=/camera/rgb/image_raw

appreciate your help!!!!!

Openni Realsense (No device connected . . . .)

Hello Guys

I have a ubuntu 14.01 intel nuc computer and ROS indigo installed. I am trying to launch openni
with the realsense camera . I have openni install as:

sudo apt-get install ros-indigo-openni-launch

roslaunch openni_launch openni.launch

I keep getting no device connected message.

Please help.

Storing point clouds

Hi,

I am trying to store the pointclouds using bag_to_pcd or pointcloud_to_pcd but with both I always get just one pointcloud, since the name does not change every time, the file is overwritten, and it has the name "0". The trouble is not with bag_to_pcd or pointcloud_to_pcd because I have tested them with another packages (pointclouds from an asus xtion pro and another package for realsense) and works fine. Could you give me a hint how can I solve this issue?
Thanks in advance,
Isabel

Try to show images from multiple realsense devices

Hi BlazingForests,

I write a application to read realsense R200 via v4l2, it would be ok if launch single device. However, if I want to show two images from two devices, it only shows one image, the other app seems cannot get data. Have yo had any experience of showing multiple devices ?
The other issue is that when I read RGB data from single device, in first time it can get data, but it cannot get data after that unless I physically replug and plug R200, do you have any idea for that ?

Thanks
Regards

ARM-ubuntu

Hello,

Is it possible to compile and use this package (intel realsense f200) using ARM-Ubuntu?
I have odroid xu4, ubuntu 14.04. ROS indigo?

Best,
Zahra

Cannot get cameras to show images

When I run

roslaunch realsense_camera realsense_rviz.launch

None of the image screens show anything (just displays "No Image")

and when I run

roslaunch realsense_camera realsense_camera.launch

I get the error

ERROR: cannot launch node of type [realsense_camera/realsense_camera_node]: can't locate node [realsense_camera_node] in package [realsense_camera]

I'm running Ubuntu 14.04 on VirtualBox via MacOSX 10.10.5 and using ROS Indigo

I'm new to ROS, so any help will be greatly appreciated. Thanks!

Intel realsense R200 ERROR

Hello

So I had been working with the intel F200 with ros . Then got a r200 because the distance
sensing limits in the f200. I download the latest git hub. catkin built it successfully . ran the
roslaunch realsense_camera realsense_r200_camera.launch. This works fine with no errors
but can not see the r200 light up!

When I run my custom code to get laser scan

`


<arg name="topic_image_rgb_raw_id" default="$(arg camera)/rgb/image_raw" />
<arg name="topic_image_depth_raw_id" default="$(arg camera)/depth/image_raw" />
<arg name="topic_image_infrared_raw_id" default="$(arg camera)/ir/image_raw" />
<node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan" args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet $(arg camera)/$(arg camera)_nodelet_manager">
  <!-- Pixel rows to use to generate the laserscan. For each column, the scan will
       return the minimum value for those pixels centered vertically in the image. -->
  <param name="scan_height" value="10"/>
  <param name="output_frame_id" value="/$(arg camera)_depth_frame"/>
  <param name="range_min" value="0.45"/>
  <remap from="image" to="$(arg camera)/depth/image_raw"/>
  <remap from="scan" to="$(arg scan_topic)"/>

  <!-- Somehow topics here get prefixed by "$(arg camera)" when not inside an app namespace,
       so in this case "$(arg scan_topic)" must provide an absolute topic name (issue #88).
       Probably is a bug in the nodelet manager: https://github.com/ros/nodelet_core/issues/7 -->
  <remap from="$(arg camera)/image" to="$(arg camera)/depth/image_raw"/>
  <remap from="$(arg camera)/scan" to="$(arg scan_topic)"/>
</node>

`

then I run this the realsense does not light up again but after a while the error below appears

select timeout error 11, Resource temporarily unavailable

select timeout error 11, Resource temporarily unavailable

stream state error depth = 1, rgb = 1

hope you can help rviz visualisation also does not show any data.

many thanks

RVIZ Transform Issue Base_link and Camera_link

I am working on a differential drive robot with two motor wheels with encoders and caster wheels. The robot also has a intel realsense depth camera.

When I launch RVIZ : Thee Global option > Fixed frame is set to Base_link and shows all the transforms for the differential driver nodes. But an error appears for the realsense Depth camera nodes with message saying :

No transform from Camera_depth_frame to baselink

No transform from Camera_depth_optical_frame to baselink

No transform from Camera_link to baselink

No transform from Camera_rgb_frame to baselink

If I change the Global option > fixed frame to Camera_link I can see all the transforms for the real sense depth camera but now the differential drive transforms are now not available

camera info

Hi,

The project is very helpful. Thanks!
One question, I didn't find published /camera_info which is needed by depthimage_to_laserscan to convert depth to laserscan. Is there any plan to add this?

Misalignment issues between the RGB and Point Cloud

We are facing misalignment issues between the RGB and Point Cloud that varies with depth. The closer the object is to the camera the more the misalignment happens. At about 40 to 50cm we see a good alignment. Any ideas how to remedy this?a

R200 support

The R200 RGDB camera does not work yet.

Here a sample output of realsense_camera_node:

 $ ./devel/lib/realsense_camera/realsense_camera_node _realsense_camera_type:="Intel RealSense 3D Camera R200"


===================
realsense_camera_type = Intel RealSense 3D Camera R200
rgb_frame_id = _rgb_optical_frame
depth_frame_id = _depth_optical_frame
depth_unit = 31.250000
depth_scale = 0.001000
depth_fxinv = 0.002156
depth_fyinv = 0.002156
depth_cx = 320.000000
depth_cy = 240.000000
depth_uv_enable_min = 0
depth_uv_enable_max = 2047
topic_depth_points_id = /depth/points
topic_depth_registered_points_id = /depth_registered/points
topic_image_rgb_raw_id = /rgb/image_raw
topic_image_depth_raw_id = /depth/image_raw
topic_image_infrared_raw_id = /ir/image_raw
debug_depth_unit = 0
rgb_camera_info_url = 
ir_camera_info_url = 
=======================


depthWithIRStream - NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO
if you want IR stream, please visit
http://solsticlipse.com/2015/03/31/intel-real-sense-3d-on-linux-macos.html
https://github.com/teknotus/depthview/tree/kernelpatchfmt

===========================================
Intel(R) RealSense(TM) 3D Camera lists

PCI: usb-0000:00:14.0-2
Serial: SN_2211011528
    /dev/video0
    /dev/video1
    /dev/video2
===========================================

use camera SN_2211011528
Directory /home/skadge/ros-dev/share/realsense_camera/data/uvmap/SN_2211011528 does not exist!!!!
video rgb name is /dev/video0
video depth name is /dev/video1

============== VIDIOC_QUERYCAP
/dev/video0 
   driver = uvcvideo
   card = Intel RealSense 3D Camera R200
   bus_info = usb-0000:00:14.0-2
   version = 0x00040202
   capabilities = 0x85200001
   device_caps = 0x05200001
   reserved[3] = [0x00000000, 0x00000000, 0x00000000]


======================== get
/dev/video0 
v4l2_pix_format
   width = 320
   height = 962
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 640
   sizeimage = 615680
   colorspace = 0
   priv = -17970434


======================== set
/dev/video0 
v4l2_pix_format
   width = 320
   height = 962
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 640
   sizeimage = 615680
   colorspace = 0
   priv = -17970434


============ VIDIOC_S_PARM
/dev/video0 
v4l2_streamparm
   timeperframe.numerator = 1
   timeperframe.denominator = 60

video rgb w,h - 320, 962

============== VIDIOC_QUERYCAP
/dev/video1 
   driver = uvcvideo
   card = Intel RealSense 3D Camera R200
   bus_info = usb-0000:00:14.0-2
   version = 0x00040202
   capabilities = 0x85200001
   device_caps = 0x05200001
   reserved[3] = [0x00000000, 0x00000000, 0x00000000]


======================== get
/dev/video1 
v4l2_pix_format
   width = 314
   height = 938
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 628
   sizeimage = 589064
   colorspace = 0
   priv = -17970434


======================== set
/dev/video1 
v4l2_pix_format
   width = 628
   height = 469
   pixelformat_value = 0x00000000
   pixelformat = 
   field = 1
   bytesperline = 1256
   sizeimage = 589064
   colorspace = 0
   priv = -17970434


VIDIOC_S_PARM error 5, Input/output error

v4l2_munmap error 22, Invalid argument
open /dev/video1 error!!!!!!!!

Note that the video streams of the camera are visible in VLC/guvcview, but interestingly 3 /dev/video devices are available while the F200 creates only 2.
/dev/video0 and /dev/video1 look both like depth maps (but not the same data, though), while /dev/video2 is the RGB stream.

No images are published

Hi,
when I run this...
roslaunch realsense_camera realsense_rviz.launch

...I repeatedly get this error message until I kill the process:

VIDIOC_DQBUF NONE error 19, No such device
VIDIOC_DQBUF NONE error 19, No such device
stream state error  depth = 1, rgb = 1

I tried using a different USB 3 Port, without success

My Setup:
Spec Value
Laptop Lenovo T540p
CPU i7-4700MQ @ 2.40GHz x 8 64bit
Memory 8GB
OS Ubuntu 14.04.1 with Linux Kernel 3.16.0.30-generic
ROS indigo

How shall I proceed in getting the camera to work? Any advice, tips or tricks?

Thanks in advance!

Terminal Output:
===================
realsense_camera_type = Intel(R) RealSense(TM) 3D Camer
rgb_frame_id = camera_rgb_optical_frame
depth_frame_id = camera_depth_optical_frame
depth_unit = 33.099998
depth_scale = 0.001000
depth_fxinv = 0.002156
depth_fyinv = 0.002156
depth_cx = 320.000000
depth_cy = 240.000000
depth_uv_enable_min = 0
depth_uv_enable_max = 800
topic_depth_points_id = camera/depth/points
topic_depth_registered_points_id = camera/depth_registered/points
topic_image_rgb_raw_id = camera/rgb/image_raw
topic_image_depth_raw_id = camera/depth/image_raw
topic_image_infrared_raw_id = camera/ir/image_raw
debug_depth_unit = 0
rgb_camera_info_url = 
ir_camera_info_url = 
=======================

depthWithIRStream - YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEES

===========================================
Intel(R) RealSense(TM) 3D Camera lists

PCI: usb-0000:00:14.0-2.1
Serial: 047140069201
    /dev/video1
    /dev/video2
===========================================

use camera 047140069201
Directory /home/anakin/sandbox/sbl/realsense/src/realsense_camera/data/uvmap/047140069201 does not exist!!!!
video rgb name is /dev/video1
video depth name is /dev/video2

============== VIDIOC_QUERYCAP
/dev/video1 
   driver = uvcvideo
   card = Intel(R) RealSense(TM) 3D Camer
   bus_info = usb-0000:00:14.0-2.1
   version = 0x00031007
   capabilities = 0x85000001
   device_caps = 0x05000001
   reserved[3] = [0x00000000, 0x00000000, 0x00000000]

======================== get
/dev/video1 
v4l2_pix_format
   width = 1280
   height = 720
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 2560
   sizeimage = 1843200
   colorspace = 0
   priv = 0

======================== set
/dev/video1 
v4l2_pix_format
   width = 1280
   height = 720
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 2560
   sizeimage = 1843200
   colorspace = 0
   priv = 0

============ VIDIOC_S_PARM
/dev/video1 
v4l2_streamparm
   timeperframe.numerator = 1
   timeperframe.denominator = 30

video rgb w,h - 1280, 720

============== VIDIOC_QUERYCAP
/dev/video2 
   driver = uvcvideo
   card = Intel(R) RealSense(TM) 3D Camer
   bus_info = usb-0000:00:14.0-2.1
   version = 0x00031007
   capabilities = 0x85000001
   device_caps = 0x05000001
   reserved[3] = [0x00000000, 0x00000000, 0x00000000]

======================== get
/dev/video2 
v4l2_pix_format
   width = 640
   height = 480
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 1280
   sizeimage = 614400
   colorspace = 0
   priv = 0

======================== set
/dev/video2 
v4l2_pix_format
   width = 640
   height = 480
   pixelformat_value = 0x56595559
   pixelformat = YUYV
   field = 1
   bytesperline = 1280
   sizeimage = 614400
   colorspace = 0
   priv = 0

============ VIDIOC_S_PARM
/dev/video2 
v4l2_streamparm
   timeperframe.numerator = 1
   timeperframe.denominator = 30

video depth w,h - 640, 480
RealSense Camera is running!
Control 134217728 is not supported
Could not set Laser Power to 16
Control 134217729 is not supported
Could not set Accuracy to 2
Control 134217730 is not supported
Could not set Motion Range Trade Off to 0
Control 134217731 is not supported
Could not set Filter Option to 5
Control 134217732 is not supported
Could not set Confidence Threshold to 6

VIDIOC_DQBUF NONE error 19, No such device
VIDIOC_DQBUF NONE error 19, No such device
stream state error  depth = 1, rgb = 1
...

Compilation problem with Dec 5 2015 clone

Hi there, I know I should probably submit proposed improvements through git, but I wanted to say that personally, I struggled getting the latest version of this to compile on my machine. Link errors with libusb. I changed a section of CMakefiles.txt as follows and I can now compile and run successfully:

V4L2, udev and libusb

find_package(PkgConfig REQUIRED)
pkg_check_modules(V4L REQUIRED libv4l2)
pkg_check_modules(UDEV REQUIRED libudev)

pkg_check_modules(LIBUSB REQUIRED libusb-1.0)

find_path(LIBUSB_INCLUDEDIR
NAMES libusb.h
HINTS /usr/include/libusb-1.0)
find_library(LIBUSB_LIBRARIES
NAMES usb-1.0
HINTS /usr/lib/ /usr/x86_64-linux-gnu/
PATH_SUFFIXES lib)

message(STATUS ${LIBUSB_INCLUDEDIR})
message(STATUS ${LIBUSB_LIBRARIES})

CV_YUV2BGR_YUYV Problem

| Camera Model | F200 |
| Firmware Version | 2.60.0.0 |
| Operating System & Version | Ubuntu 14.04 LTS |
| Kernel Version (Linux Only) | 4.4.0-040400 generic |

Hi All,

I am getting the following error. CV_YUV2BGR_YUYV is a constant that is defined to be 116 in opencv headers.

Any ideas what's missing?

/home/nima/catkin_ws/src/realsense_camera/src/realsense_camera.cpp: In function ‘void processRGBD()’:
/home/nima/catkin_ws/src/realsense_camera/src/realsense_camera.cpp:576:39: error: ‘CV_YUV2BGR_YUYV’ was not declared in this scope
cv::cvtColor(rgb_frame_yuv,rgb_frame,CV_YUV2BGR_YUYV);
^
make[2]: *** [realsense_camera/CMakeFiles/realsense_camera_node.dir/src/realsense_camera.cpp.o] Error 1
make[1]: *** [realsense_camera/CMakeFiles/realsense_camera_node.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.