BlazingForests / realsense_camera

use realsense camera in ROS
Other
36 stars 26 forks source link

Openni Realsense (No device connected . . . .) #20

Open TonderaiZR opened 8 years ago

TonderaiZR commented 8 years ago

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.

BlazingForests commented 8 years ago

@Tondy Hi This ROS package is independent of OpenNI. You can read the README file to use it.

After you done,If you have any question,Please tell me. Thx DD

TonderaiZR commented 8 years ago

Hello Blazing

Ok. So I trying to do some SLAM and acml. To do it you nee a launch file to get the point cloud data and convert it to laser scan data for this to work which I thought why openni would be necessary. Does the library have this feature?

BlazingForests commented 8 years ago

@Tondy Hi

Did you means 2D SLAM?

This ROS package publish two topics (The type is sensor_msgs::PointCloud2)

/camera/depth/points point cloud without RGB like OpenNI /camera/depth/points /camera/depth_registered/points point cloud with RGB

I think your can use this package to run your application.

THX DD

TonderaiZR commented 8 years ago

I meant using pointcloud_to_laserscan http://wiki.ros.org/pointcloud_to_laserscan. The problem is the pointcloud to laserscan package requires openni to run!

BlazingForests commented 8 years ago

@Tondy Hi

You just need modify the sample_node.launch file.

Replace

    <!-- start sensor-->
    <include file="$(find openni2_launch)/launch/openni2.launch">
        <arg name="camera" default="$(arg camera)"/>
    </include>

with

    <!-- start sensor-->
    <include file="$(find realsense_camera)/launch/realsense_camera.launch" />

and

Replace

 <remap from="cloud_in" to="$(arg camera)/depth_registered/points_processed"/>

with

 <remap from="cloud_in" to="/camera/depth_registered/points"/>
TonderaiZR commented 8 years ago

Hello Thank you that worked with sample_node.launch when trying do this with a launch file for a turtlebot replicate robot. Using the launch file below this error appears: Not sure whats happening?

unused args [num_worker_threads, rgb_processing, publish_tf, depth_registration, depth_processing, ir_processing, disparity_processing, disparity_registered_processing, depth_registered_processing] for include of [/home/tondy/catkin_ws/src/realsense_camera/launch/realsense_camera.launch] The traceback for the exception was written to the log file

start_laser1.txt

BlazingForests commented 8 years ago

@Tondy Hi

realsense_camera.launch don't have this args.

I think you need found out what topic are you need to use in the "to_laserscan" application.

I take a look of your start_laser1.txt file, I think you need "/camera/depth/image_raw" and "/camera/depth/camera_info" and some the others.

Then write your new launch file to set them.

This package's 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

sensor_msgs::CameraInfo /camera/rgb/camera_info cameraInfo for RGB sensor /camera/depth/camera_info cameraInfo for depth sensor /camera/ir/camera_info cameraInfo for infrared sensor

THX DD

TonderaiZR commented 8 years ago

Hello DD

I thank you so much for the help. After spending hours of trail and error. I got rid of most of the errors: Except this one: /home/tondy/catkin_ws/src/fake_laser_pkg/launch/start_laser.launch] requires the 'depth' arg to be set The traceback for the exception was written to the log file

Please have a look at start_laser.txt. If it works we can add the launch file to the current source code so others can use it.The pointcloud_to_laserscan is vital for people looking to do slam with the real sense for autonomous navigation.

Kind regards. Thanks

start_laser.txt

BlazingForests commented 8 years ago

@Tondy Hi

I think you just need modify

<remap from="image" to="$(arg camera)/$(arg depth)/image_raw"/>
...
<remap from="$(arg camera)/image" to="$(arg camera)/$(arg depth)/image_raw"/>

to

<remap from="image" to="$(arg camera)/depth/image_raw"/>
...
<remap from="$(arg camera)/image" to="$(arg camera)/depth/image_raw"/>

Thx DD