## For instruction on writing tutorials ## http://www.ros.org/wiki/WritingTutorials #################################### ##FILL ME IN #################################### ## for a custom note with links: ## note = ## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links ## note.0= [[turtlebot_bringup/Tutorials/hydro/TurtleBot Care and Feeding|TurtleBot Care and Feeding]] ## descriptive title for the tutorial ## title = 3D Visualisation ## multi-line description to be displayed in search ## description = Visualising 3d and camera data from the kinect/asus. ## the next tutorial description (optional) ## next = ## links to next tutorial (optional) ## next.0.link= ## next.1.link= ## what level user is this tutorial for ## level= BeginnerCategory ## keywords = turtlebot kinect asus #################################### <<IncludeCSTemplate(TutorialCSHeaderTemplate)>> <<TableOfContents(4)>> ## <<Youtube(3ydRXC76MV0)>> == Starting the 3D sensor == Plug in your sensor to the netbook. /!\ Be sure that you do not connect it on a usb 3.0 port (these are usually, but not always, coloured if they are of the 3.0 kind) since these devices still only work in usb 2.0. Assuming you have already launched the turtlebot software (refer to the [[turtlebot_bringup/Tutorials/hydro/TurtleBot Bringup|turtlebot bringup tutorial]]), you can proceed to launch the 3D sensor functionality on top: {{{ > roslaunch turtlebot_bringup 3dsensor.launch }}} By default, this will launch the 3d sensor with all the processing modules ON. You can turn these off by sending the appropriate arguments to the launch command (look inside `3dsensor.launch` for more information). The turtlebot apps themselves do this - they only enable exactly what they need to minimise the amount of processing that is done for their task. == Start Rviz == On your workstation computer start rviz already configured to visualize the robot and its sensor's output: {{{ > roslaunch turtlebot_rviz_launchers view_robot.launch }}} Note that this also lets you various other aspects of the robot as well. == Enable the desired displays == To visualize any display you want, just click on its check button. These are the displayed sensors: * !DepthCloud * Registered !DepthCloud * Image * !PointCloud * Registered !PointCloud For example, in the following screen capture both !LaserScan and Registered !DepthCloud are enabled. {{attachment:turtlebot_bringup/Tutorials/groovy/3D Visualisation/rviz_capture.png|rviz Turtlebot capture|width="800"}} == A bit more about 3D data structures == Groovy introduced the `depth_image` data type that is now used by default in most places. Without processing, the openni nodelet will just produce depth images. This is the raw data structure provided by the openni driver for 3d information. Upon enabling some processing, this can be converted into the more usable PCL format. RViz now has views for both data types and you'll note the visualisation of both data types is the same - a 3d point cloud drawn by opengl. You can see both plugins when running rviz via `view_robot.launch`. '''Q) How are depth images and point clouds used in the Turtlebot?''' For low level operations - depth images are used. Since no conversion is done, it's faster. The [[depthimage_to_laserscan]] package does this because it needs to be fast to save computation for mapping. For more complicated operations, such as [[turtlebot_follower]] it uses the pcl format where it then has access to the host of algorithms in the point cloud library. The default 3dsensor.launch file configures the 3D sensor to provide you with fully processed 3d data (registrations, point clouds, fake laser scans) for convenience. The turtlebot apps like follower each call `3dsensor.launch` and enable only the processing modules they need via clever use of roslaunch args. == What Next? == * [[turtlebot_teleop/Tutorials/Keyboard Teleop|Keyboard Teleoperation]] or return to [[Robots/TurtleBot|TurtleBot main page]]. ## AUTOGENERATED DO NOT DELETE ## TutorialCategory ## FILL IN THE STACK TUTORIAL CATEGORY HERE