Assembling The BOT and Exporting it....
Previously on this page...…
- We had look at terms and concepts in ROS1.
- We started designing parts in Fusion 360 .
- Installed fusion to urdf exporter
Assembling the robot...…
- Hope you completed the designing process for different parts and are ready to assemble the bot, in this section I will give you some tips for assembly.
- To began with assembly ,in Fusion 360 open a new file and drag and drop parts from left side section, start with base of robot also remember to name the file with small letters don't use capital letters, ros will show warning as it will break conventions.
- So now as you brought all parts in same file we are ready to assemble it, on top, in solid section you will find assemble section, expand it and hover the cursor over any tool to get short note on what the tool do.
- Now click on joint tool, on right , new section will be created which ask for selection for parts, now as per urdf convention your base link (base of robot) should be parent link and others should be child of it followed by parent-child relation ship.
- So, NOTE: component 2 will be always parent and component 1 will be child of it, so to start with selection for component1, it will ask for joint origin, its up to you which you will choose but choose it wisely and only on the surface, here is the example for parent-child and joint origin selection:
- In above image you can see that the component 2 is base link(robot base) and component 2 is the clamp.
- Above image is example of joint origin selection, you can see how I have selected the origin for component1
- Now as base link is parent and clamp is child, how can you assemble other joints between clamp and other components, don't worry the selected child can be a parent for other components following the parent child relation ship.
- I.e. now if you want to join shaft and clamp you can, but condition 2 parents can't have same child or we can say 1 child should have only 1 parent.
- So, keep these points in mind while assembling the bot with joints, Also I will summaries all the important points at bottom.
- for example your joints will be like this : base-->clamp (parent-->child) ; clamp-->shaft ; shaft-->wheels...…
- Now you can complete your assembly by following these points and your bot will look like this:
- also one thing you will notice in this image and above too, that my robot base is renamed to "base_link" and there is no chain (🔗) or link symbol which indicates that component is linked with original one and and changes in original will appear in assembly.
- So the take away is that you have to first break the link by right clicking on component and selecting break link and then rename your robot base by double clicking on component, to "base_link".
- One last thing you have to do is move base link in such a way that wheels are X-Y plane and if your coordinate system is not like mine one, you can do that by hovering on home icon and you will get like this:
- Now if every thing goes well you can export the file to urdf by pressing "shift+s" and you will find urdf exporter select it and hit run button.
- It will ask for folder to save and if everything goes will you will receive message "Urdf exported successfully" and now you have converted your 3d cad model to urdf and done with first stage for the project.
Understanding the files exporter has generated...…
- Now navigate to your folder where you have urdf files the urdf folder will be named as "robot_name_description" i.e. if your assembly file name is pnp_bot then the folder containing urdf will be named as pnp_bot_description.
- open this folder you will find more three folders and three files namely launch, meshes, urdf folder and CMakeLists.txt , package.xml, Licenses files.
- Lets take a look at folders for now:
- Launch folder: this folder contains all your launch files, yaml file and Rviz file, don't worry if your are not familiar with these kind of file formats, fill free to open them and take look at those.
- Meshes folder: this folder will contain all your mesh files i.e. files which are used in 3D printing or any other purpose you will notice all these are in same format which is ".STL" I want you to explore the types of mesh files available and explore ".dae" files.
- URDF folder: this folder contain '.xacro', '.gazebo',' .trans' files we will the look at these files in detail in next post.
- CMakeLists file: this file contains all the dependences of your package, if your have gone through beginner tutorials from ros wiki page you are familiar with this file.
- Package file: this file will help ros to find and recognize description folder as a rospackage again you will be familiar with this file if you have gone through beginner tutorials.
- Now I think its enough for this post mean while I want you to go through the different files in this folder, if are not able to understand the terms don't worry we will take look at each file in detail in next two posts.
Points to remember:
- No child will have more than 1 parents in CAD assembly or 2 or more parents can't have same child.
- Component 2 in joint tool will always be parent.
- The base component of robot should be renamed to base_link and should be in ungrounded form.
- Before exporting to urdf make sure, you have broke the link of each component and save it.
- Most important ONE COMPONENT MUST ONLY CONTAIN BODIES NOT COMPONENT, i.e. all the components should only have bodies, not component in it, we haven't created nested component for now so if you are following this blog page you will not encounter this error.
Bonus...
For now we have completed our first stage of project and for motivation, if you are using vm-ware copy this folder to your catkin_ws/src folder or if you are on using wsl use the command below to copy the folder to catkin_ws:
cp -r /mnt/<drive>/<robot_description> ~/catkin_ws/src
cp -r /mnt/<drive>/<robot_description> ~/catkin_ws/src
replace <drive> with the drive in which your folder is present and <robot_description> with your exported description folder.
make sure your Xserver is running ,then copy paste command give below in terminal:
roslaunch robot_description gazebo.launch
again replace robot description with with exported description folder, you will find window like this:
- Where are colors and material of robot😱😱, will explain it in upcoming posts.
- If you are using Dual boot just copy this description folder to catkin_ws/src and paste above command in terminal.
- If you are using on windows installed ros, copy the folder to catkin_ws/src and also try run the same launch command if any error occurs let me know in comments and don't hesitate to fill the contact form.
Upcoming.....
- In next post we will take a detail look at xacro , gazebo, trans , launch files
- we will launch robot in Rviz.
- we will control robot in gazebo using plugin





Comments
Post a Comment