Configuring move_base node parameters

There are some configurations to the move_base node too. The move_base node configuration is placed in the param folder. Following is the definition of move_base_params.yaml:

#This parameter determine whether the cost map need to shutdown when move_base in inactive state 
shutdown_costmaps: false 
 
#The rate at which move base run the update loop and send the velocity commands 
controller_frequency: 5.0 
 
#Controller wait time for a valid command before a space-clearing operations 
controller_patience: 3.0 
 
#The rate at which the global planning loop is running, if it is 0, planner only plan when a new goal is received 
planner_frequency: 1.0 
 
#Planner wait time for finding a valid path befire the space-clearing operations 
 
planner_patience: 5.0 
 
#Time allowed for oscillation before starting robot recovery operations 
oscillation_timeout: 10.0 
 
#Distance that robot should move to be considered which not be oscillating. Moving above this distance will reset the oscillation_timeout 
 
oscillation_distance: 0.2 
 
# local planner - default is trajectory rollout 
base_local_planner: "dwa_local_planner/DWAPlannerROS" 

We have discussed most of the parameters used in the Navigation stack, the gmapping node, and the move_base node. Now we can start running a gmapping demo for building the map.

Start the robot's tf nodes and base controller nodes:

    $ roslaunch chefbot_bringup robot_standalone.launch

Start the gmapping nodes using the following command:

    $  roslaunch chefbot_bringup gmapping_demo.launch

This gmapping_demo.launch will launch the 3Dsensor, which launches the OpenNI drivers and depth to the laser scan node, and launches gmapping node and movebase node with necessary parameters.

We can launch a teleop node for moving the robot to build the map of environment. The following command will launch the teleop node for moving the robot:

    $ roslaunch chefbot_bringup keyboard_teleop.launch

We can see the map building in RViz, which can be invoked using the following command:

    $ roslaunch chefbot_bringup view_navigation.launch

We are testing this robot in a plane room; we can move robot in all areas inside the room. If we move the robot in all the areas, we will get a map as shown in the following screenshot:

Figure 10: Creating a map using gmapping is shown in RViz

After completing the mapping process, we can save the map using the following command:

    $ rosrun map_server map_saver -f /home/lentin/room

The map_server package in ROS contains the map_server node, which provides the current map data as an ROS service. It provides a command utility called map_saver, which helps to save the map.

It will save the current map as two files: room.pgm and room.yaml. The first one is the map data and the next is its meta data which contains the map file's name and its parameters. The following screenshot shows map generation using the map_server tool, which is saved in the home folder:

Figure 11: Terminal messakges while saving a map

The following is the room.yaml:

image: room.pgm 
resolution: 0.010000 
origin: [-11.560000, -11.240000, 0.000000] 
negate: 0 
occupied_thresh: 0.65 
free_thresh: 0.196 

The definition of each parameter follows:

  • image: The image contains the occupancy data. The data can be absolute
    or relative to the origin mentioned in the YAML file.
  • resolution: This parameter is the resolution of the map, which is
    meters/pixels.
  • origin: This is the 2D pose of the lower left pixel in the map as (x, y, yaw)
    in which yaw as counter clockwise(yaw = 0 means no rotation).
  • negate: This parameter can reverse the semantics of white/black in the map and the free space/occupied space representation.
  • occupied_thresh: This is the threshold deciding whether the pixel is occupied or not. If the occupancy probability is greater than this threshold,
    it is considered as free space.
  • free_thresh: The map pixel with occupancy probability less than this threshold is considered completely occupied.

After mapping the environment, we can quit all the terminals and rerun the following commands to start AMCL. Before starting the amcl nodes, we will look at the configuration and main application of AMCL.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.47.208