Here is the book promo video which describe the Chefbot Project and the each chapters in the book
This project is about building an autonomous mobile robot with the help of Robot Operating System(R.O.S) and Python.
To make the experience fit your profile, pick a username and tell us what interests you.
We found and based on your interests.
Here is the book promo video which describe the Chefbot Project and the each chapters in the book
As the title says, we are going to see how to build an autonomous mobile robot called Chefbot which is for serving food and beverages in hotels and restaurants.
This was a hobby project and i built this robot after seeing a robot calledTurtlebot2. The main aim of the project was to build an open source autonomous mobile robot research platform and doing some application using it. Serving food was one of the application of the robot and i have named the robot as Chefbot.
Note : The robot is not using Roomba as the base platform which is used in Turtlebot2; instead of Roomba, i have built the entire mechanism from scratch.
I have documented the entire building procedure of this robot into a book calledLearning Robotics using Python published by PACKT publishers. The book already featured in R.O.S Blog, Robohub, OpenCV website, Python book listetc.
The header images shows the book cover page and the Chefbot prototype.
This tutorials is a quick start guide for developing this robot, for detailed designing and development, you should refer the book itself.
You should have basic knowledge in Python and ROS for starting with this tutorials.
In this tutorials series, you can see an abstract of each chapters of this book. Following are main steps that we are going to discuss
In this step, we can see an abstract of the Chefbot design process mentioned in the book.
The robot design starts from a set of requirements.
Following conditions have to be met by the robot design.
Here are the requirementsAfter analyzing and designing from the requirement we are coming to the conclusion that, following parameters should be on the robot.
Motor SpecificationSo we should design a drive system of robot and buy motors that is matching with these specs.
Next step is to design the robot chassis.
Robot Chassis DesignWe are taking the 3-platform layered architecture in this robot which is similar to Turtlebot 2.
I have used following free software tools for sketching and viewing the 2D and 3D design of the robot
In Ubuntu you can install these tool using following command
Installing LibreCAD
$ sudo apt-get install librecad
Installing Blender
$ sudo apt-get install blender
Installing Meshlab
$ sudo apt-get install meshlab
You can see the 2D design of robot, base plate, middle plate and top plate of the robot modeled using LibreCAD.
The dimensions of plates and dimensions of each holes are given below
DimensionsHere are the dimensions of each plate
Base plate:
The middle and top plate have the same dimensions of base plate with same screw size and other dimensions. You can view these plates from the image gallery.
Each plates are connected using hollow tubes with screws. You can see its dimensions from the images.
The 3D modeling is done using Python script inside Blender. You can see screenshot of Blender with robot model from the images.
The Python script and Blender 3D model file is attached along with this step.
We can export the robot model to STL it can viewed in 3D mesh viewing tool called Meshlab which is included in the images.
The python script to generate robot model in Blender is given below
import bpy #This function will draw base plate def Draw_Base_Plate(): #Added two cubes for cutting sides of base plate bpy.ops.mesh.primitive_cube_add(radius=0.05, location=(0.175,0,0.09)) bpy.ops.mesh.primitive_cube_add(radius=0.05, location=(-0.175,0,0.09)) ################################################ #Adding base plate bpy.ops.mesh.primitive_cylinder_add(radius=0.15,depth=0.005, location=(0,0,0.09)) #Adding booleab difference modifier from first cube bpy.ops.object.modifier_add(type='BOOLEAN') bpy.context.object.modifiers["Boolean"].operation = 'DIFFERENCE' bpy.context.object.modifiers["Boolean"].object = bpy.data.objects["Cube"] bpy.ops.object.modifier_apply(modifier="Boolean") ################################################ #Adding booleab difference modifier from second cube bpy.ops.object.modifier_add(type='BOOLEAN') bpy.context.object.modifiers["Boolean"].operation = 'DIFFERENCE' bpy.context.object.modifiers["Boolean"].object = bpy.data.objects["Cube.001"] bpy.ops.object.modifier_apply(modifier="Boolean") ################################################ #Deselect cylinder and delete cubes bpy.ops.object.select_pattern(pattern="Cube") bpy.ops.object.select_pattern(pattern="Cube.001") bpy.data.objects['Cylinder'].select = False bpy.ops.object.delete(use_global=False) #This function will draw motors and wheels def Draw_Motors_Wheels(): #Create first Wheel bpy.ops.mesh.primitive_cylinder_add(radius=0.045,depth=0.01, location=(0,0,0.07)) #Rotate bpy.context.object.rotation_euler[1] = 1.5708 #Transalation bpy.context.object.location[0] = 0.135 #Create second wheel bpy.ops.mesh.primitive_cylinder_add(radius=0.045,depth=0.01, location=(0,0,0.07)) #Rotate bpy.context.object.rotation_euler[1] = 1.5708 #Transalation bpy.context.object.location[0] = -0.135 #Adding motors bpy.ops.mesh.primitive_cylinder_add(radius=0.018,depth=0.06, location=(0.075,0,0.075)) bpy.context.object.rotation_euler[1] = 1.5708 bpy.ops.mesh.primitive_cylinder_add(radius=0.018,depth=0.06, location=(-0.075,0,0.075)) bpy.context.object.rotation_euler[1] = 1.5708 #Adding motor shaft bpy.ops.mesh.primitive_cylinder_add(radius=0.006,depth=0.04, location=(0.12,0,0.075)) bpy.context.object.rotation_euler[1] = 1.5708 bpy.ops.mesh.primitive_cylinder_add(radius=0.006,depth=0.04, location=(-0.12,0,0.075)) bpy.context.object.rotation_euler[1] = 1.5708 ################################################ #Addubg Caster Wheel bpy.ops.mesh.primitive_cylinder_add(radius=0.015,depth=0.05, location=(0,0.125,0.065)) bpy.ops.mesh.primitive_cylinder_add(radius=0.015,depth=0.05, location=(0,-0.125,0.065)) #Adding Kinect bpy.ops.mesh.primitive_cube_add(radius=0.04, location=(0,0,0.26)) #Draw middle plate def Draw_Middle_Plate(): bpy.ops.mesh.primitive_cylinder_add(radius=0.15,depth=0.005, location=(0,0,0.22)) #Adding top plate def Draw_Top_Plate(): bpy.ops.mesh.primitive_cylinder_add(radius=0.15,depth=0.005, location=(0,0,0.37)) #Adding support tubes def Draw_Support_Tubes(): #################################################### #Cylinders bpy.ops.mesh.primitive_cylinder_add(radius=0.007,depth=0.30, location=(0.09,0.09,0.23)) bpy.ops.mesh.primitive_cylinder_add(radius=0.007,depth=0.30, location=(-0.09,0.09,0.23)) bpy.ops.mesh.primitive_cylinder_add(radius=0.007,depth=0.30, location=(-0.09,-0.09,0.23)) bpy.ops.mesh.primitive_cylinder_add(radius=0.007,depth=0.30, location=(0.09,-0.09,0.23)) #Exporting into STL def Save_to_STL(): bpy.ops.object.select_all(action='SELECT') # bpy.ops.mesh.select_all(action='TOGGLE') bpy.ops.export_mesh.stl(check_existing=True, filepath="/home/lentin/Desktop/exported.stl", filter_glob="*.stl", ascii=False, use_mesh_modifiers=True, axis_forward='Y', axis_up='Z', global_scale=1.0) #Main code if __name__ == "__main__": Draw_Base_Plate() Draw_Motors_Wheels() Draw_Middle_Plate() Draw_Top_Plate() Draw_Support_Tubes() Save_to_STL()
After designing the robot 3D model, the next step is to simulate the robot. I have describe complete simulation of this robot from scratch in the book. The simulation is done using R.O.S and Gazebo.
Here is the quick start to do the robot simulation.
Prerequisites for simulation:The first figure shows the Chefbot simulation in Gazebo.
We need following R.O.S packages to run this simulation.
Following command will install necessary dependencies.
$ sudo apt-get install ros-indigo-turtlebot ros-indigo-turtlebot-apps ros-indigo-turtlebot-interactions ros-indigo-turtlebot-simulator ros-indigo-kobuki-ftdi ros-indigo-rocon-remoconSetting R.O.S Catkin workspace
$ git clone https://github.com/qboticslabs/Chefbot_ROS_pkg.git
From the cloned files, copy the chefbot folder into catkin workspace src folder and build the workspace using catkin_make command.
Running Chefbot SimulationLaunch the simulation using the following command
$ roslaunch chefbot_gazebo chefbot_hotel_world.launch
This will open Gazebo simulator with a hotel like environment which is shown in the second image.
Now we are trying to implement autonomous navigation in simulation. First we have to perform SLAM for building map of the environment and after building the map, we have to run AMCL nodes for localizing the robot on the map.
After localization, we can command robot to go into a particular table position for delivering the food and will return to the home position after delivering food.
Performing SLAM using ChefbotWe can see how to perform SLAM and AMCL using the simulated environment.
Start the SLAM algorithm using the following command
$ roslaunch chefbot_gazebo gmapping_demo.launch
Start visualizing the map in Rviz using the following command
$ roslaunch chefbot_bringup view_navigation.launch
We can start mapping the entire hotel by moving robot around the environment.
We can move robot manually using teleoperation, following command can be used for teleoperation for Chefbot
$ roslaunch chefbot_bringup keyboard_teleop.launch
We can generate the map of the environment as shown below. When the mapping is complete we can save the map to a file using following command
$ rosrun map_server map_saver -f ~/hotel_world
This saved map is used for the next step for doing AMCL
Performing AMCL on ChefbotAfter saving the map, close all terminal and start the Gazebo and its nodes using following command
$ roslaunch chefbot_gazebo chefbot_hotel_world.launch
Launch the AMCL node using the following command
$ roslaunch chefbot_gazebo amcl_demo.launch map_file:=/home/hotel_world.yaml
Start Rviz with necessary settings for visualization
$ roslaunch chefbot_bringup view_navigation.launch
Now we can see the robot is localized on the map which is having the same position of Gazebo.
We can command the robot to go to a particular position inside map using Rviz2D Nav Goal Button.
Using 2D Nav goal button we can give a goal pose to the robot and then you can see the robot will plan a path to that position and move to that path by avoiding obstacles autonomously.
We have performed the simulation of complete robot, now it's the time for designing the hardware prototype of the simulated robot.
Create an account to leave a comment. Already have an account? Log In.
Become a member to follow this project and never miss any updates