Navigation
Navigation part is implemented by following steps.
- A map of the world is prebuilt using
gmapping
package. If we want to change the world, a new map need to be generated and saved. - The
amcl
package is used to localize the robot. The odometry message of the robot will be published in/odom
topic which contains the pose between robotbase_link
andodom
frame. - The
move_base
package will use both global planning and local planning to plan a path to the goal position, and drive the robot to achieve it.
Three API are provided to implement robot navigation similar to what we use in Amazon Warehouse exercise:
- self.client.get_target_pose(target_name): get the goal pose of the robot to stop in front of conveyor with target_name. The goal pose for each stop position is specified in
navigation.yaml
file. - self.client.send_goal_to_client(pose): send the goal pose to move_base client.
- self.client.get_result_from_client(): get navigation result from client. If the result is
True
, navigation is finished.
The collision model of the conveyors are changed to be detected by lasers as obstacles. I also tested that when new obstacles are added into the world without marked in the map, if laser can detect it, the navigation package will also take it into consideration when planning path.
The problem with navigation is that it sometimes gets stuck when it is close to obstacles and cannot find a way to desired position. It can probably be improved by further tuning some parameters of planners.
Manipulation
Manipulation part is implemented by following steps.
- Load the information of objects and obstacles from yaml file, including absolute pose, size, shape, color.
- Make the robot stops in target position in front of the conveyor.
- Pick up object
- Move the robot arm to home position for pick and place task.
- Get robot pose from
/odom
topic and caculate the relative pose between object and robot. - Spawn the model of objects and conveyor into planning scene.
- Move to some distance above the object, move down and grasp the object.
- Delete the model of objects and conveyor in planning scene.
- Move robot arm to home position with the object in the gripper and move the mobile robot to the target postion.
- Place object
- Move the robot arm to home position for pick and place task.
- Get robot pose from
/odom
topic and transform the place target position from world frame to robot frame. - Spawn the model of conveyor into planning scene.
- Move to some distance above the object, move down and grasp the object.
- Delete the model of conveyor in planning scene.
Currently, the robot can grasp all three objects(sphere, cylinder, box), but their orientation will be changed when the gripper is grasping and releasing them, so they cannot be stably placed on the plane. For this reason, we can only pick and place one object each time.
world and GUI of the third exercise
The image below shows the world and GUI of the third exercise: Mobile Manipulation. The world contains three conveyors, a mobile manipulator and three objects.
Structure of the third exercise
mobile_manipulation(exercise folder)
- MyAlgorithm.py
- pick_and_place.py
- move_base_client.py
- warehouse.world
- mobile_manipulation_main.launch
- mobile_manipulation_gui.launch
- navigation.yaml
industrial_robots(new packages)
- neo_simulation
- neo_kinematics_mecanum
- mmo500_moveit_config
rqt_industrial_robot(new package)
- rqt_mobile_manipulator