February 2020
Intermediate to advanced
432 pages
10h 50m
English
For efficiency, we should offload the Raspberry Pi from visualization tasks and move them to the remote laptop. In order to so, we need to rework the launch files so that GoPiGo3 strictly runs the code that's necessary for the robot to work, that is, the gopigo3_driver.py part of the mygopipo package we described in Chapter 6, Programming in ROS – Commands and Tools, plus the lidar.launch part of the ydlidar package. These two components can be launched with the following commands:
r1 $ roslaunch mygopigo gopigo3.launchr2 $ roslaunch ydlidar ydlidar.launch
The launch files in r1 and r2 can be grouped into one, like so. We will call this script gopigo3_ydlidar.launch:
<launch> <include file="$(find mygopigo)/launch/