Skip to Content
Robot Operating System Cookbook
book

Robot Operating System Cookbook

by Kumar Bipin
June 2018
Intermediate to advanced
484 pages
11h 36m
English
Packt Publishing
Content preview from Robot Operating System Cookbook

How to do it…

  1. Attach the gdb debugger with the launch file as follows:
 <launch> 
  <node pkg=""chapter4_tutorials"" type=""program1"" name=""program1"" output=""screen"" 
  launch-prefix=""xterm -e gdb --args""/> 
</launch> 
  1. Start the ROS node within gdb debugger using the launch command:
$ roslaunch chapter4_tutorials program1_gdb.launch
  1. Create a new xterm terminal with the node attached to gdb, as shown in the following screenshot.

Moreover, we can set breakpoints if needed and then press the c or r key to run the node and debug it. The source code can be listed by using the l command:

ROS node with gdb debugger
  1.  Try debugging python in ...
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

Mobile Intelligent Autonomous Systems

Mobile Intelligent Autonomous Systems

Jitendra R. Raol, Ajith K. Gopal
Wheeled Mobile Robotics

Wheeled Mobile Robotics

Gregor Klancar, Andrej Zdesar, Saso Blazic, Igor Skrjanc

Publisher Resources

ISBN: 9781783987443Supplemental Content