-
Notifications
You must be signed in to change notification settings - Fork 2
Pattern recognition with 3D Cameras Microsoft Kinect & ASUS Xtion PRO LIVE
This is a tutorial on how to use the Microsoft Kinect & ASUS Xtion PRO LIVE cameras to create rgb-overlay point clouds in rviz and add the framework of a datamatrix.
First, get the OpenNI packeges by running
sudo apt-get install ros-hydro-openni*
For a basic HOWTO on OpenNI startup see http://wiki.ros.org/openni_launch/Tutorials/QuickStart
:: Step 4 use rosrun rqt_reconfigure rqt_reconfigure
instead.
Execute
roslaunch openni_launch openni.launch
rosrun rviz rviz
Set the Fixed Frame to /camera_link
Click Add and choose the PointCloud2 display. Set its topic to /camera/depth/points
.
Set ColorTransformer to AxisColor
and select axis Z
.
rosrun rqt_reconfigure rqt_reconfigure
type camera/driver
and enable the depth_registration checkbox
:: NOTE: The ROS driver no longer publishes in the unregistered /camera/depth/
namespace, but instead in /camera/depth_registered/
Back in rviz, set PointCloud2 topic to /camera/depth_registered/
and ColorTransformer to RGB8
REMARK:
- Installed Xtion plugin for OpenNI from github https://github.com/PrimeSense/Sensor -> Does not work. Stick to OpenNI2 for Xtion
roslaunch openni2_launch openni2.launch
rosrun rviz rviz
Set Fixed Frame topic to camera_rgb_optical_frame
, set PointCloud2 topic to /camera/depth/points
and
ColorTransformer to AxisColor
and select axis Z
Adjust the camera configuration settings:
rosrun rqt_reconfigure rqt_reconfigure
Type camera/driver
and enable the depth_registration checkbox
:: NOTE: The ROS driver no longer publishes in the unregistered /camera/depth/
namespace, but instead in /camera/depth_registered/
Back in rviz, set PointCloud2 topic to /camera/depth_registered/
and ColorTransformer to RGB8
download http://elearning2.uniroma1.it/mod/resource/view.php?id=35518
extract into catkin_ws/src
gedit datamatrix_finder/src/datamatrix_finder.cpp
run rostopic list
check if the subscribed topic on line 165 is published by the camera. If not, change to "/camera/rgb/image_rect_color"
save
sudo apt-get install libdmtx-dev
cd to catkin_ws
run catkin_make
run rospack profile
rosrun datamatrix_finder datamatrix_finder_node 0.133
with the size of the datamatrix in meters. An image window should open, displaying the datamatrix frame overlay over the rgb image
Back in rviz, add TF to the display. Two frames now will mark the position of the cameras and one the position of the datamatrix.
###FURTHER ISSUES: