We have already discussed how to build a map of the environment using the robot simulation and robot hardware. In this section, we discuss how to command the robot to go into a particular place of the map. A better way to find the position of the robot in each table is to manually drive the robot using teleoperation.
Assuming that ChefBot packages are configured in both the robot's PC and the user's PC, there should be Wi-Fi networks to which both the robot and user PCs can connect and communicate using the IP assigned to each PC. It should be noted that we have to set ROS_MASTER_URI
and ROS_IP
, as mentioned in Chapter 10, Integration of ChefBot Hardware and Interfacing it into ROS, Using Python.
The following procedure can be used to test the robots that are working in a hotel environment:
ssh
command. The command is given as follows:$ ssh <robot_pc_ip_address>
$ roslaunch chefbot_bringup robot_standalone.launch
$ roslaunch chefbot_bringup gmapping_demo.launch
$ roslaunch chefbot_bringup keyboard_telop.launch
$ roslaunch chefbot_bringup view_navigation.launch
home
folder:$ rosrun map_server map_saver -f ~/<name_of_the_map>
$ roslaunch chefbot_bringup amcl_demo.launch map_file:=~/<map_name.yaml>
$rosrun tf tf_echo /map /base_link
We will get the translation and rotation value of the robot in each position, as shown in the following screenshot:
Note the corresponding position of the robot near each table and feed it to the GUI code. The editing GUI code must be on the user PC. After inserting the position of the robot in each table on the GUI code, run the GUI node using the following command on the user system:
$ rosrun chefbot_bringup robot_gui.py
The following GUI will pop up and we can control the robot using this GUI.
We can command the robot to go into a particular table by giving the table number on the GUI and pressing the Go button. When we press the Go button, the corresponding goal position is sent to the navigation stack. After testing the GUI, we can deploy the robot on the current environment.
We can see the advantages and disadvantages of this navigation method. The navigation method mainly depends on the ROS framework and programming using Python.
The main highlight of the ROS navigation is that the code is open and reusable. Also, it is simple to understand, even if the handling technology is complex. People with minimal computer knowledge can program an autonomous robot.
The cons of this method are: this is not yet stable and is still in the testing stage, we can't expect high accuracy from this method, and the code may not be of industrial standards.
3.139.105.159