更多资料 参看
http://wiki.western.edu/mcis/index.php/Robotics-sum11/backup/Tutorial
http://www.ros.org/wiki/mit-ros-pkg/KinectDemos/HandDetection
http://www.ros.org/wiki/openni_camera
kinect ros
basicly follow the rules in
http://www.ros.org/wiki/openni_kinect
http://www.ros.org/wiki/openni_camera
but most important:
To view in rviz, launch rviz:
rosrun rviz rviz
Set the Fixed Frame (top left of rviz window) to /openni_rgb_optical_frame.
Add a Point Cloud2 display, and set the topic to /camera/rgb/points.
to view the bio image
rosrun image_view image_view image:=/camera/depth/image_raw
rosrun image_view disparity_view image:=/camera/depth/disparity
//http://www.ros.org/wiki/openni_camera_unstable
open it to get the Node [/openni_node1]
http://www.ros.org/wiki/openni/Contests/ROS%203D/Teleop%20Kinect%20Cleanup
安装 ni
lu@lu-desktop:~$ rosinstall ~/ni /opt/ros/diamondback 'http://www.ros.org/wiki/ni?action=AttachFile&do=get&target=ni.rosinstall'
rosinstall operating on /home/lu/ni from specifications in rosinstall files /opt/ros/diamondback,http://www.ros.org/wiki/ni?action=AttachFile&do=get&target=ni.rosinstall
processing config_uri /opt/ros/diamondback
//hg clone https://kforge.ros.org/openni/openni_ros
遇到问题 没装git
sudo apt-get install python-setuptools
sudo easy_install -U rosinstall
sudo apt-get install git-core curl
装完之后 结果
rosinstall ~/ni /opt/ros/diamondback 'http://www.ros.org/wiki/ni?action=AttachFile&do=get&target=ni.rosinstall'
rosinstall operating on /home/lu/ni from specifications in rosinstall files /home/lu/ni/.rosinstall, /opt/ros/diamondback,http://www.ros.org/wiki/ni?action=AttachFile&do=get&target=ni.rosinstall
processing config_uri /opt/ros/diamondback
Installing https://github.com/ros-pkg-git/ni.git master to /home/lu/ni/ni
Already up-to-date.
Bootstrapping ROS build
[ rosmake ] Packages requested are: ['ros']
[ rosmake ] Logging to directory/home/lu/.ros/rosmake/rosmake_output-20110916-170016
[ rosmake ] Expanded args ['ros'] to:
['rosdep', 'rospack', 'rosmake', 'rosemacs', 'rosclean', 'roscreate', 'rosbash', 'rosboost_cfg', 'rosunit', 'roslang', 'rosbuild', 'mk', 'roslib', 'test_roslib', 'test_roscreate', 'test_rospack', 'test_rosmake', 'test_rosdep']
[ rosmake ] Generating Install Script using rosdep then executing. This may take a minute, you will be prompted for permissions. . .
rosdep executing this script:
{{{
set -o errexit
#No Packages to install
}}}
[ rosmake ] rosdep successfully installed all system dependencies
[rosmake-0] Starting >>> roslib [ make ]
[rosmake-0] Finished <<< roslib ROS_NOBUILD in package roslib
[rosmake-0] Starting >>> rosdep [ make ]
[rosmake-0] Finished <<< rosdep ROS_NOBUILD in package rosdep
No Makefile in package rosdep
[rosmake-1] Starting >>> rosemacs [ make ]
[rosmake-0] Starting >>> rosmake [ make ]
[rosmake-1] Finished <<< rosemacs ROS_NOBUILD in package rosemacs
No Makefile in package rosemacs
[rosmake-0] Finished <<< rosmake ROS_NOBUILD in package rosmake
[rosmake-1] Starting >>> rosclean [ make ]
[rosmake-1] Finished <<< rosclean ROS_NOBUILD in package rosclean
[rosmake-1] Starting >>> roscreate [ make ]
[rosmake-1] Finished <<< roscreate ROS_NOBUILD in package roscreate
[rosmake-1] Starting >>> rosbash [ make ]
[rosmake-1] Finished <<< rosbash ROS_NOBUILD in package rosbash
No Makefile in package rosbash
[rosmake-1] Starting >>> rosboost_cfg [ make ]
[rosmake-1] Finished <<< rosboost_cfg ROS_NOBUILD in package rosboost_cfg
No Makefile in package rosboost_cfg
[rosmake-1] Starting >>> rosunit [ make ]
[rosmake-1] Finished <<< rosunit ROS_NOBUILD in package rosunit
[rosmake-1] Starting >>> rosbuild [ make ]
[rosmake-1] Finished <<< rosbuild ROS_NOBUILD in package rosbuild
No Makefile in package rosbuild
[rosmake-1] Starting >>> roslang [ make ]
[rosmake-1] Finished <<< roslang ROS_NOBUILD in package roslang
No Makefile in package roslang
[rosmake-1] Starting >>> mk [ make ]
[rosmake-1] Finished <<< mk ROS_NOBUILD in package mk
No Makefile in package mk
[rosmake-1] Starting >>> test_roslib [ make ]
[rosmake-1] Finished <<< test_roslib ROS_NOBUILD in package test_roslib
[rosmake-1] Starting >>> test_roscreate [ make ]
[rosmake-1] Finished <<< test_roscreate ROS_NOBUILD in package test_roscreate
[rosmake-0] Starting >>> test_rospack [ make ]
[rosmake-0] Finished <<< test_rospack ROS_NOBUILD in package test_rospack
[rosmake-1] Starting >>> test_rosmake [ make ]
[rosmake-1] Finished <<< test_rosmake ROS_NOBUILD in package test_rosmake
[rosmake-1] Starting >>> test_rosdep [ make ]
[rosmake-1] Finished <<< test_rosdep ROS_NOBUILD in package test_rosdep
[ rosmake ] Results:
[ rosmake ] Built 18 packages with 0 failures.
[ rosmake ] Summary output to directory
[ rosmake ] /home/lu/.ros/rosmake/rosmake_output-20110916-170016
rosinstall update complete.
Now, type 'source /home/lu/ni/setup.bash' to set up your environment.
Add that to the bottom of your ~/.bashrc to set it up every time.
If you are not using bash please see http://www.ros.org/wiki/rosinstall/NonBashShells
details:
Node [/openni_node1]
Publications:
* /camera/depth/image [sensor_msgs/Image]
* /camera/rgb/image_raw [sensor_msgs/Image]
* /camera/rgb/image_mono/compressed [sensor_msgs/CompressedImage]
* /camera/rgb/image_mono/compressed/parameter_updates [dynamic_reconfigure/Config]
* /camera/depth/image/theora [theora_image_transport/Packet]
* /camera/depth/image_raw/theora [theora_image_transport/Packet]
* /camera/depth/image_raw/theora/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /camera/rgb/image_mono/theora/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /camera/rgb/image_raw/compressed [sensor_msgs/CompressedImage]
* /camera/rgb/image_mono/compressed/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /camera/rgb/image_mono/theora/parameter_updates [dynamic_reconfigure/Config]
* /camera/rgb/image_raw/compressed/parameter_updates [dynamic_reconfigure/Config]
* /camera/depth/image/theora/parameter_updates [dynamic_reconfigure/Config]
* /openni_node1/parameter_updates [dynamic_reconfigure/Config]
* /camera/depth/image_raw/compressed/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /camera/rgb/points [sensor_msgs/PointCloud2]
* /camera/rgb/camera_info [sensor_msgs/CameraInfo]
* /camera/rgb/image_color/compressed [sensor_msgs/CompressedImage]
* /camera/rgb/image_color/compressed/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /camera/depth/image/compressed [sensor_msgs/CompressedImage]
* /camera/depth/image_raw/theora/parameter_updates [dynamic_reconfigure/Config]
* /camera/depth/image_raw/compressed [sensor_msgs/CompressedImage]
* /camera/rgb/image_color/theora/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /camera/depth/camera_info [sensor_msgs/CameraInfo]
* /camera/rgb/image_color [sensor_msgs/Image]
* /camera/rgb/image_raw/compressed/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /rosout [rosgraph_msgs/Log]
* /camera/depth/disparity [stereo_msgs/DisparityImage]
* /camera/depth/image_raw [sensor_msgs/Image]
* /camera/rgb/image_color/compressed/parameter_updates [dynamic_reconfigure/Config]
* /camera/depth/image/theora/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /camera/rgb/image_mono [sensor_msgs/Image]
* /camera/rgb/image_raw/theora/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /camera/rgb/image_color/theora/parameter_updates [dynamic_reconfigure/Config]
* /camera/depth/points [sensor_msgs/PointCloud2]
* /camera/rgb/image_raw/theora [theora_image_transport/Packet]
* /camera/rgb/image_raw/theora/parameter_updates [dynamic_reconfigure/Config]
* /camera/depth/image_raw/compressed/parameter_updates [dynamic_reconfigure/Config]
* /camera/rgb/image_mono/theora [theora_image_transport/Packet]
* /camera/rgb/image_color/theora [theora_image_transport/Packet]
* /camera/depth/image/compressed/parameter_updates [dynamic_reconfigure/Config]
* /openni_node1/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /camera/depth/image/compressed/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
Subscriptions: None
Services:
* /openni_node1/get_loggers
* /camera/rgb/image_raw/compressed/set_parameters
* /camera/rgb/image_raw/theora/set_parameters
* /camera/rgb/image_color/theora/set_parameters
* /camera/rgb/image_mono/compressed/set_parameters
* /camera/rgb/image_color/compressed/set_parameters
* /camera/depth/image_raw/compressed/set_parameters
* /camera/depth/image/compressed/set_parameters
* /openni_node1/set_logger_level
* /openni_node1/set_parameters
* /openni_node1/unload_nodelet
* /camera/depth/image/theora/set_parameters
* /camera/depth/image_raw/theora/set_parameters
* /openni_node1/list
* /openni_node1/load_nodelet
* /camera/rgb/image_mono/theora/set_parameters
Pid: 9765
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /camera/rgb/image_color
* to: /image_view_1316159918529090633
* direction: outbound
* transport: TCPROS
* topic: /camera/rgb/points
* to: /rviz_1316161202975329862
* direction: outbound
* transport: TCPROS