This week I was updating exercise structure in the Robotics Academy repository, so that students can start using packages that were added as well use new API commands.

New packages

  1. map_server – to load map
  2. AMCL – for robot localization
  3. move_base – for local and global navigation
  4. cmd_vel_mux – velocity control multiplexer, so both teleop GUI and move_base can operate at the same time

Additionally, several config files are included in the main exercise folder. If neccessary, they can be updated right there.

API commands

  • self.client.sendGoalToClient(x, y) - to send goal to the move_base client
  • self.client.getResultFromClient() - to send get result from client. None if not reached the goal
  • self.grid.getDestiny() - to get destination of the robot after double click on GUI
  • self.path.getPath() - to obtain the path to the current goal
  • self.liftDropExecute() - to lift or drop pallet
  • clearCostmaps() - to clear costmaps after moving with pallet

Solution using these commands is shown in the following video:


Further updates to the exercise

To make exercise more realistic, we have decided to add the following updates to the exercise:

  1. Add second robot which will autonomously navigate in the warehouse, so that our main robot will have to avoid dynamic obstacles.
  2. Generate pallets dynamically in the delivery zone, so that robot will have to pick them and deliver to the warehouse several times.

Further steps

I have found out how we can run shell commands in Python and spawn new objects in Gazebo world:

import os
os.system("rosrun gazebo_ros spawn_model -database coke_can -sdf -model coke_can3 -y 2.2 -x -0.3")

I just will have to spawn our pallets in the same way.

Additionally, dynamic_reconfigure package can be used in the same way if it will be required later.