[Documentation] [TitleIndex] [WordIndex

Only released in EOL distros:  

hrl_hardware_drivers: force_torque | hrl_hokuyo | hrl_segway_omni | hrl_tilting_hokuyo | pan_tilt_robotis | phantom_omni | robotis | zenither

Package Summary

Python code to use a Robotis servo to tilt a Hokuyo to get 3D point clouds.

Making the Rig

Servo part number, CAD models for mounting adaptors, instructions for constructing the rig can be found here:

Getting a Point Cloud

Before using this code to obtain point clouds, you need to:

  1. have made a rig consisting of a Hokuyo mounted on a Robotis servo.
  2. be able use robotis to operate a Robotis servo.

  3. be able to use hrl_hokuyo to get scans from a Hokuyo.

Once you have the rig set up:

  1. roscd hrl_hokuyo; roslaunch acm0_utm.launch

  2. roscd hrl_tilting_hokuyo/src/hrl_tilting_hokuyo

  3. python tilt_hokuyo_servo.py -h

  4. Run it with appropriate parameters. For example:
    • python tilt_hokuyo_servo.py -d /dev/ttyUSB0 -n0 --save_scan --speed=10 --id=<servo id> --l2=0.035

  5. You should see the servo tilt the UTM between the two angles that you specified.
  6. Once the code runs, it will save the scans in a pkl. (e.g. 2009Oct05_203107_dict.pkl)

  7. To view the point cloud, use display_3d_mayavi.py (python display_3d_mayavi.py -h)

Using the Code

Brief description of the different files in this package:

  1. tilt_hokuyo_servo.py - defines the class to obtain point clouds.

  2. display_3d_mayavi.py - Uses mayavi2 to display point clouds.

  3. processing_3d.py - some functions for working with point clouds. Includes segmenting doors, door handles, horizontal surfaces (tabletops, countertops etc.), objects on a horizontal surface etc.

  4. occupancy_grid_3d.py - 3D occupancy grid implementation in python.

Troubleshooting

  1. Can you get scans from a Hokuyo using hrl_hokuyo?

  2. Can you use robotis to operate a servo?

  3. Walls are not vertical or walls and the ceiling do not seem to be at right angles in the point cloud:
    1. roscd hrl_tilting_hokuyo/doc

    2. look at the file servo_transforms.jpg

    3. Ensure that l1 and l2 that you are specifying when you run tilt_hokuyo_servo.py are correct.

    4. Note: l2 can be negative depending on how the UTM is mounted.


2024-11-30 14:39