Skip to Content
Hands-On ROS for Robotics Programming
book

Hands-On ROS for Robotics Programming

by Bernardo Ronquillo Japón
February 2020
Intermediate to advanced
432 pages
10h 50m
English
Packt Publishing
Content preview from Hands-On ROS for Robotics Programming

Simulating the LDS

After including the LDS model in the virtual robot, we can proceed to see how it works by running the simulation in Gazebo:

  1. Execute the following commands in separate Terminals to see the sensor in action:
T1 $ roslaunch virtual_slam gopigo3_world.launchT2 $ rosrun key_teleop key_teleop.py /key_vel:=/cmd_velT3 $ rostopic echo /gopigo/scan

In T3, you will see a large feed of data, since each LaserScan message contains 720 points to cover the 360° view around the sensor.

  1. To test this sensor, it is better to use a Python script that makes the robot wander in the environment while avoiding the obstacles. To do this, we have implemented the following rules in our script:
    • If there is no obstacle, move forward at a reference ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering ROS for Robotics Programming

Mastering ROS for Robotics Programming

Lentin Joseph
ROS Robotics By Example - Second Edition

ROS Robotics By Example - Second Edition

Lentin Joseph, Carol Fairchild, Dr. Thomas L. Harman

Publisher Resources

ISBN: 9781838551308Supplemental Content