Difference between revisions of "Kinect basics"

From sdk-wiki
Jump to: navigation, search
m (Protected "Kinect basics": Setting Permissions for (almost all) Pages - editable and moveable by all logged in users ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)))
(Install openni for kinect connectivity)
Line 4: Line 4:
<syntaxhighlight lang="bash" enclose="div">
<syntaxhighlight lang="bash" enclose="div">
     $ sudo apt-get install openni-camera openni-launch
     $ sudo apt-get install openni-camera openni-launch
    $ rospack profile

Revision as of 13:33, 30 October 2014

Upon successful installation of kinect drivers, kinect can be interfaced with Baxter.

Install openni for kinect connectivity

    $ sudo apt-get install openni-camera openni-launch

You may need to reboot the robot to correctly install the camera drivers. To start publishing the kinect camera, run the openni_launch file:

    $ roslaunch openni_launch openni.launch

You can now publish a static tf transform for the kinect connected to a frame on the robot like so:

    $ rosrun tf static_transform_publisher <x> <y> <z> <qx> <qy> <qz> <qw> <parent frame> /camera_link 50

If you launch rviz and add a camera linked to /camera/rgb/image_color and add a TF obect, deselecting Show Names and Show Axes, you should be able to see the output from the kinect with an icon indicating its relative position to the robot Using the transform:

    $ rosrun tf static_transform_publisher 1 0 0 .1 0 0 0 /torso /camera_link 50

Kinect TF example