-
Notifications
You must be signed in to change notification settings - Fork 6
Workshop 6 ‐ Navigation II
For this task, you are required to work in simulation for the time being.
-
Launch the simulation in the way you learnt in the previous weeks - you can check the dedicated Wiki pages if you don't remember how to do it.
-
Launch the navigation stack by invoking the following command
ros2 launch limo_navigation limo_navigation.launch.py
-
Add a new
Map
type marker for yourlocal_costmap
topic, and set theColor scheme
tocostmap
. Notice how obstacles got inflated by a safety area which is not traversable by the robot. You can read more about it here. -
Inspect the new file
demo_inspection.py
that has been added to the repository of the module. It contains a list of user defined waypoints that the robot will follow using aBasicNavigator
approach. -
Now, run the autonomous waypoints-based navigation by typing in a new terminal
ros2 run cmp9767_tutorial demo_inspection
and the robot should start moving, before returning to the initial position.
-
Add a cube in the middle of the arena, as in the following image, and then try again the waypoint navigation script. Observe the resulting behaviour, if the robot is able to avoid the new obstacle or not.
Let's try yourself now to find a new set of waypoints for your custom application. Ideally, when we are in an environment which I have the map, a simple approach would be to teleoperate the robot first on top of the waypoints we want the robot goes through autonomously, and record their coordinates by listening to the robot pose topic at that moment and location.
-
As such, the first objective is to find the coordinate of the waypoints. The current
demo_inspection.py
script needs a list ofPoseStamped
messages. The first objective is to identify which topic does publish amsg
of a suitable type (e.g.,Pose
,PoseStamped
,PoseWithCovarianceStamped
, etc). -
Once you found a suitable topic, keep a terminal open meanwhile you are
ros2 topic echo XXX
on the topicXXX
you found at the previous stage. -
Teleoperate the robot where you would like the robot to stop and modify the
inspection_route
list in thedemo_inspection.py
file such that each element of the list is in the format[pos_x, pos_y, or_x, or_y, or_z, or_w]
by using the values that are printed in console. -
Once you are happy with the list of waypoints, try the
demo_inspection.py
file with your own modification.
-
In case the robot has difficulties in navigating from waypoint to waypoint in case they are too close to obstacles, remember you can modify some parameters (e.g., 'robot_radius' for increasing the robot footprint, 'inflation_radius' for increasing safety space around obstacles) of the
global/local costmap
, either by:-
inspecting the
/opt/ros/lcas/install/limo_navigation/share/limo_navigation/params/nav2_params.yaml
file and change the values forinflation_radius
layer such that the robot does not get stuck near the walls. This change will be reflected the next time you launch the simulation. -
dynamically reconfigure on the fly by opening
ros2 run rqt_gui rqt_gui
or by simply typingrqt
from the console and then from the menu barPlugins/Configuration/Dynamic Reconfigure
. Please selectglobal_costamp
orlocal_costamp
in the menu on the left, and you should be able to visualise all the parameters you can change.
-