Control Velodyne from ROS

We can now load the Gazebo plugin as usual, and it will listen on ROS topic for incoming float messages. These messages will then be used to set the Velodyne's rotational speed.

  1. Start roscore

    source /opt/ros/<DISTRO>/setup.bash
    roscore
  2. In a new terminal, start Gazebo

    cd ~/velodyne_plugin/build
    source /opt/ros/<DISTRO>/setup.bash
    gazebo ../velodyne.world
  3. In a new terminal, use rostopic to send a velocity message.

    source /opt/ros/<DISTRO>/setup.bash
    rostopic pub /my_velodyne/vel_cmd std_msgs/Float32 1.0
  4. Change the last number of the above command to set different velocities.


+ Recent posts