ROS 2 MoveIt 2 [1H Crash Course]

ROS 2 MoveIt 2 [1H Crash Course]

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI

Оглавление (14 сегментов)

Segment 1 (00:00 - 05:00)

Hey everyone and welcome to this crash course on Move It 2 with Ross 2. You have learned Ross 2 basics and you want to work with robotic arms. Maybe you've already started to look at Move It 2, but you feel completely lost. Well, you have come to the right place. In this crush course, you will learn the basics of Move It 2 and see how to configure a robotic arm with Move It so you can make the robot move. So, what are we going to do exactly? Well, first we will install Move It 2. I will then give you a URDF for a sixaxis robotic arm that we will use as a starting point. We will add collision tags inside the URDF and then create a configuration using the move it setup assistant. I will show you all the steps you need to do. Once we have the configuration package, you will get an overview of the files that you can find in this package and we will finish by starting the move it demo so you can do some motion planning with the arm. To get started, you don't need to know anything about move it, but you do need some ROS to basics, including how to write a URDF. So, in case you are a complete beginner, I have other courses and tutorials that can help you first. To finish with this introduction, well, this crash course is great to get started. And if you want to go further, I have a much bigger course for you on Move It 2, which includes 7 hours of video content. In this full course, you will learn how to create the URL from scratch, do the move it configuration and then also bridge move it with your own ROS2 application using the move it C++ and Python API and also you will see how to connect move it to your own hardware using ROS to control. So if you're interested you can find the full course link in the description below. All right and now let's get started with the crush course to install movie 2. It's going to be very easy. It's just going to be one line. So, you can just go to Google again and just type install move it to. You will end up to this page here. So, that's the move it uh installation page with move it to binary install. You choose your ROS to distribution. So, if I'm using jazzy, I go to Ross to Jazzi. If you're using another one, just pick the other one. And you can see that well, we just need to run this command. Now before we do that you see that they recommend cyclone DDS as a middleware. So ROSTU is based on DDS for the communication and the default one is called fast DDS as for now. So it could work fine with fast DDS but there has been some issues and cyclone DDS seems to work better. So we can actually change the DDS configuration for ROS 2. And to do that we don't need to do anything complex. Okay, we just need to install the TDS and then to add one environment variable here to export one here in the terminal. So you can copy uh well here's not very clear but you can copy the first command sudo apst install with ros dro rmw cyclone dds cpp just that and we are going to put this in the terminal here. So I'm going to bring this back here. Okay. And install that. All right. I've already installed before. And then to actually use this DDS, you need to do this export RMW implementation with RMW cyclone DDS CPP and then it's going to use Cyclone DDS. And to be able to use it every time, I'm just going to add this line into the bash. So I'm already in my home directory. bash rc and I'm going to add that actually at the beginning well at the end of the bash rc but before the lines to source ros two just like that so now we have three lines the first one to change the dds to cyclone dds then we uh we source ros 2 installation and then we source for the colcon autocomp completion let's save and let's exit great and now we can install move it We just run this. It's very easy. ROS distribution move it. Okay. And for me it's also already installed. Great. And now just open a new terminal and then you have Ros2 and move it to installed and configured on your computer. So as you can see installing move it is really not that complicated. to be able to get started with the course we need a URDF for the six axis robotic arm that we are going to work with all right because if you don't have that well you cannot work with move it and basically for most things you're going to do in ROS to for any robot the URF is going to be the stepping stone of your application without the UDF you cannot do anything and that's also the case for move it and so to keep things focused on move it here I'm not going to

Segment 2 (05:00 - 10:00)

write the UDF from scratch so we do this in the full course but here I'm going to give it to you directly okay so you can download this uh there is the zip file called movie to crash course starting code you can download this so the link is in the description and we are going to extract okay and inside we have my robot description so this is a package we're going to start from that and what I'm going to do now is actually to create a workspace so a roster workspace so we can put this package and we and build it, source it. And there's a launch file that we can start already to visualize the URF. Okay. So, let's go back to the home directory. Actually, I'm going to do that from the terminal. And I'm going to create a ROSU workspace folder in the home directory. Okay. I go inside and I create an SRC folder. Okay. So, that's basically creating a ROS to workspace. Then, still in this ROS to workspace here, I'm going to build with colon build. All right. And this is going to create a build, install, and log folders. Okay. So, I just had the source, and now I have those ones. Now, you know that to be able to source this workspace, we need to do a source install setup. bash. And to make it more convenient, we are going to add this line into the bash RC. So that every time we open the terminal, our workspace is going to be sourced. So, let's do that quickly. Let's open with Jedit. And I'm just going to the path of the bash RC cuz you should already know that I go here and well what I've done already you see I have my uh cyclone DDS here line I have the line to source the global roto installation that's very important I also have one line to have the call code complete and then I'm going to add one at the end source uh that's going to be so ros to workspace install setup dot bash. All right. So I s this bash script that I have just generated here from my workspace. When I save this close okay and now every time we open a terminal our workspace is sourced. Now I'm going to go to the source folder and we have nothing for now. So, what I'm going to do is from this uh movie it crash course starting code, I'm going to just uh take the my robot description and I'm going to put it in the source folder of my workspace. Okay, just like that. So now you see well I have the package here. You can just use this package as it is. We are going to go back one step and do another call on build. Uh there's just one package so you don't need to put the packages select. All right. So it's going quite fast. And then well you can open a new terminal or just source from here. And what I'm going to do is I'm going to start there's a launch file. So ros to launch my robot description. Okay. That's the package. There's a launch file called display. launch. xml. You can find it with the autocomp completion. I'm going to start. And you see that we have this. So we have a joint state publisher GUI here where you see joint one to six and on a we see a six axis robotic arm. Okay. So that's the URF for the six axis robotic arm with six joints. So you can experiment a bit. So there's the joint one here and then we have the joint two that moves like that. Then the joint three. Okay. The joint four here. There's a rotation here. the joint five. Okay. So, you see everything is a rotation and then the joint six is here. All right. So, you can make the robot move already and just get used to it a bit. One thing you can see is that if I move one joint, everything else is moving. Okay? Because we have a relationship between each joint. Okay? Each joint is basically the parent of the next one. actually not join but each link is the parent of the next link with the corresponding joint. Here we can actually see that I'm just going to open quickly. I'm going to do that here. I'm going to do ROS to run TF2 tools with view frames. So we're going to listen to the TF for 5 seconds and then it's going to print a TF three should be here. We have the PDF. All right. And you can see those are the links. Okay. So the base link is going to be this base here. Can also check that with the robot model. Okay. With the different links. Uh the base link is that one. Okay. So you can also check that here. Then we have the shoulder link, the arm, elbow, uh forearm, wrist, hand, and we also

Segment 3 (10:00 - 15:00)

have a two link at the end. Okay. So you can see the TF3 like this. And now that you have seen the overview, let's actually just check what's in the code. So to code, I'm going to my ROS to workspace in my source folder. And I have already installed Visual Studio Code. I'm going to do code dot from here. All right. And let's see what we have. So we have my robot description. You see this is a well this is a standard package with package. xml XML cmake list. txt. What do we do here? We install three directories. So a launch one, an RV one with an RV config and then the URDF1. What do we have in the URF1? You see we have that's going to be the main URDF file. You see my robot. f. zacro. Here we include the two other files. The first one is common properties. In this one I just well I just have material tags here gray and blue. Okay. So that's how I have my uh colors here from those material tags. And then I have the arm. zacro which here contains all of the links and all of the joints of the robots. Okay. So we have the base link. You see the shoulder link, the arm link, elbow, forearm, wrist, hand. Those are the six links. Okay. The six physical part of our robot. Actually not six but seven parts. And then we have six joints. So join one to six uh between all those seven parts. And you might also wonder well what is this thing here? We have an empty link. That's a tool link. Okay. So I've added another an extra tool link. And you see I have a joint that's the hand tool joint between the hand link. So the handling is basically the last link of the robot and this tool link I'm going to show you here. Uh so this is uh the robot like that. Okay. And if I go to maybe I can remove the links. If I go to I just put the hand where is this the hand link and then in the tree in the frames of TF I'm going to put the hand link okay you can see the hand link well maybe I can actually put the links again and reduce the uh transparency here let's say 0. 6 six. Okay. So, the hand link is basically you see the origin for the hand. Okay. And then we have the shape for the hand link. But then if you want to add tools later on your robot, you are not going to add the tools here. You're at the end of this. So that's why I have created a tool link. So if I put the tool link here, you see the tool link is here. So it's kind of a virtual link. Okay? There's nothing physical attached here. But then later on if you add a gripper it's going to be very easy because you just create a gripper in the URL and then you simply say that the tool link is the parent link for the gripper. Okay. So that's why I have an extra two link. So in the end we have what we have seven links plus one and then we have six joint plus one also for the two link. All right so you can check the URF for more details but that's basically what you need to know for now. And then well we have a config okay that's the that's why when I start I have the configuration that I had and then we have a launch file and in this launch file you can see that's the one we have started okay we first start the robot state publisher with the URDF okay so we pass the URF so you see that's the stepping stone of any application you start the robot state publisher with the URF okay so that's what we did then we have started here a kind of fake joint state publisher That's the window we have here. And of course, we have started Arvis with the uh configuration. And so, make sure you correctly install this and make sure you can uh build the workspace and then see this on a starting point for this crash course. To be able to configure the robot for move it, we need first a URF, which is what we have already with the links and the joints. But in the links we also need collision elements. For now we only have visual elements. Okay. So here we are going to add the collision for each link. So we are going to go to uh our workspace. I'm going to open the workspace with Visual Studio Code and we are going to go back to the URDF. So we have the main URDF file with the common properties and arm. zacro. just need to work on this file. Now, as you can see, each link here for each

Segment 4 (15:00 - 20:00)

physical part of the robot has only a visual element. But for move it to be able to compute collisions, you need to provide a collision element as well. Now, how do we do that is actually very easy. I'm going to just do the base link here. So you have the visual tag and after the visual tag but still inside the link. Okay. So it must be separate from visual but inside the link we're going to add collision tag. So I open and I close. And what do I put inside this collision tag? Well, I'm going to have a geometry and an origin. I'm not going to have a material. And so if you check the robot on RV, well the visual here is going to represent uh the rigid physical part of this base link. And so what would be the collision element? Well, the collision element is the same as the visual. Okay, in this case, so I'm going to take the geometry and the origin. It's going to be the same thing. All right. And that's basically it for the baselink. So the visual is a box 40 cm by 40 by 10. Uh the collision is also a box with the same size and this box is going to be centered around the origin. So we also need to offset the origin. Same value as for the visual. Okay, I'm going to save. And now there's a very important thing to know is well the visual is just used for you to visualize. It's not really used for anything in Ross. But then the collision is used to compute collisions, right? So the more complex the shape that you have here, computation. Which means that by default, what you should try to do is to simplify as much as possible the shape. It doesn't necessarily need to be the same here between the visual and the collision. Okay? The collision shape can be simplified. What does it mean? Well, for a box, what's simpler than a box? Nothing. But then, for example, you have a cylinder here. Instead of using a cylinder, which is a more complex shape than a box, you could use a box instead for the collision. Okay? So, visual could be a cylinder and the collision could be a box. And then, well, that's for the basic shapes. But if you have a custom mesh, well, depends on the meshes. But let's say you have a base link also with custom STL file or collider file. Maybe if this is very close to a box, you can make some approximation and say that the collision is also a box which is going to make computations much simpler. Another possibility is that you create a new STL file with less details. Okay, because the visual might be very detailed with lots of round angles and stuff like that. Okay. And lots of small details, but you don't need all of that to compute the collision. So what you can do is you can export one very detailed STL file or collada file for the visual and then a simplified STL file for the collision. All right. So that's the principle for the collision element. For this example that we have here for this project, well, we're only using boxes and cylinders. So it's going to be quite easy to do. And then how to visualize that? Well, I'm gonna come back here. I'm going to do a call con build. I'm going to s and then I'm going to launch my robot description display. xml. So, same thing. We have the robot and how do we see the collision? You go on robot model and you see you have visual enabled. So I'm going to remove the visual and I'm going to enable the collision. And you can see now I have my box here. Okay, that's the collision for the baselink. All right, so you can toggle between visual and collision to see either the visual or to see the collision. So let's go ahead. We already have the base link. We're going to do the shoulder link. So after visual and inside the link we're going to add collision like this collision and actually what I can do is I'm just going to add this for each link. So for the arm link after the visual for the elbow link for the forearm link and then for the wrist link for the hand link and finally we have the two link but you see the two link doesn't have any visual it's kind of a virtual link so we don't add any collision as well. Okay, so we will have six collisions in total. And then let's

Segment 5 (20:00 - 25:00)

fill those tags. So in the shoulder link, you see we have a cylinder. Cylinder is already quite basic shape. So we could just keep the same. But for the sake of this example here, I'm going to simplify as much as possible. So I'm going to use a box instead of a cylinder. Okay. So let's just I'm going to take the geometry here and the origin. I'm going to put it inside the collision. And then instead of using cylinder, I'm going to use box with size. So size here and then three dimensions. So what are the three dimensions? Well, the length of the cylinder is going to correspond to the height of the box. Okay, so we will have the X Y and then the Z is going to be 0. 5. Okay, because the cylinder is pointing up. So this is the height. And then what is the X and Y? So what is the size of the box? Well, we have a radius of 0. 1. Meaning that if we think of diameter, the diameter would be 0. 2. Okay, so 20 cm on the X and the Y axis. So that's going to be 0. 2. to 0. 2 0. 5 and then the origin. So the box is going to be centered on its origin. We need to shift by half of the height which is 0. 25. We can save. I'm just going to look at this one before doing the following ones. So let's do a call con. So we are in the roster workspace. I do call con build. You can also put those two ampers and do source um install setup. bash. So it's only one line and you do a build and the source. And then if I come back to the display launch file, I'm going to remove the visual and enable the collisions. And you see now this is a box. So if you were wrong with the dimensions, you will easily see that in a okay. So I encourage you to also check what you're doing. And you see that um here. So the box is a bit bigger than the cylinder of course, but it's simpler. And then the question is, is this going to be enough? Okay, do we need more precision? Because the collision is going to be more precise if we have a cylinder than box. But this is perfectly fine because anyway, you don't necessarily want the arm to go that close to uh this shoulder link. Okay, just think about it. When you walk yourself through a door, you just go somewhere in the middle. Okay? You're never really trying to go as close as possible to the door without colliding to the door. Okay? You always have some margin. So, it's not a problem to have a bit of extra margin when calculating the collisions. Unless you really need a high precision, then it's completely fine. Okay. So here you can see for all the cylinders we can use boxes which is not going to make a big difference. Okay. So let's go back to I'm going to stop this and let's go back to the code and let's continue. Okay. So for the arm link we are going to also take the geometry and the origin put it inside the collision. This is a cylinder so I'm going to use a box instead. box size and then the radius is 0. 05. So diameter is going to be 0. 1 and then 0. 6 for the length which is the height of the box. Okay. So that's same logic here. And then the origin also is shifted by 0. 3 because by default the shape is going to be centered around the origin. So we need to add half of the height. Okay. So you see we can go quite quick here. I'm going to do the same for the elbow. So I'm taking the geometry and the origin. I'm going to replace this with a box size. Okay. So what is the radius? 0. 05. So the diameter is 0. 1. And then the length here 0. 1. And the origin is correct. Let's go with the forearm link. We take geometry and origin. Same thing we do box with size which is 0. 1. Okay. Reduce is 0. 05. 1 and the length 0. 5. I'm going to the wrist link. I'm taking the geometry and the origin.

Segment 6 (25:00 - 30:00)

And this one, no need to change anything. It's a box. So, we keep the box. Same dimensions. And then for the hand, I'm just taking the same stuff. And this is a box. So, we don't change it. Okay. So, you see it goes very fast. I'm going to save. And that should be it. Okay. So, now we have a collision tag as well as a visual tag for each link from the base link, the shoulder link, the arm link, the elbow link, the forearm, wrist, and hand links. I'm going to go back and I'm going to build in source again and run. Okay. Uh you can check if you have any error log here. Okay. We don't have any. So it should be okay. And then I'm going to remove the visual. Enable the collision. And you see I have my full arm. Okay. With only boxes here. And uh you can see I can make the robot move. Okay. And so this is the well this is basically the same thing. It's just that this visual is going to be used so that you can actually see what's happening. But then this collision is going to so those shapes are going to be used actually by move to compute collisions. And you can see that some shapes are colliding. For example here the elbow is colliding with the arm. But this is okay. When two shapes are adjacent, we're going to be able to disable the collision. So this is just like if there was no collision. But for example, uh if we have let's say something like that. Okay, you see that we can do this. Okay, we can go inside the uh shoulder link. And so move it is going to make sure that this doesn't happen. And also if you have other um things in the workspace, if you have other shapes then move it can also compute the collisions thanks to those collision elements here and the collision element of the other shapes that you have in the workspace. All right. And so that's basically it for the collisions. Now the URF is complete and we can start to configure the robot with move it. Now that we have a URDF with all the links and joints as well as collision tags inside the links, we can configure the robot for move it. How do we do that? Well, first make sure that you have correctly installed move it from the installation section. And you should be able to run this. So Rossu launch there's a package called move it setup assistant. Okay, you can use the autocomp completion and then it should be setup assistant. aunch py. Let's press enter and you should get this window here the move it setup assistant and through that we are going to configure everything and then it's going to create a new package for us. Okay. So do we want to create a new or editing and exiting package? We're going to click on create new configuration package. Now you need to load a uldf or colada robot model. So what we are going to do is we're going to browse and we are going to go to rust workspace source my robot description urdf and we're going to take myroot urdf zacro. Click on open and so you just give the path to the file in which you have the uldf we click on load files. Okay, you see success and you can see here you should be able to have so it's kind of an obvious view. You should be able to see the robot. We have the visual and we have the collision. So you should be able to see this. If you see this, it means the URF has been successfully loaded. Okay. Now we can go ahead and we're just going to do everything step by step. Okay, one by one. So self collisions. What I told you is that some collisions can be disabled. For example, between the shoulder link and the arm link, there's going to be a collision here that can be disabled because it's just adjacent. And then some collisions might never happen because just physically impossible. And so what we can do here is just one thing to do. We're going to click on generate collision matrix. And you can see that it's going to generate a matrix here with for example between arm and elbow those are adjacent. So we disable the collision checking for that one. Same as between the base and the shoulder. You see the elbow and the forearm. And then you have stuff like arm link and handling because move it has computed that it's not possible for this to be in

Segment 7 (30:00 - 35:00)

collision with that. So we're just going to disable the collision checking. Okay. And so well you just need to click on that once and that's it. Then we are going to go to virtual joint and you can see here create a virtual joint between the base robot link and an external frame of reference. So it allows to place the robot in the world or on a mobile platform. And so the base link here that's the root link. I'm going to add a virtual joint and I'm going to name it virtual joint. Okay. The child is going to be the base link and then the parent we're going to write world. Okay. So basically we are creating a virtual link that name is world and there's going to be a transformation between the world and the base link. It's going to be fixed. Okay. So it's basically at the same point but then it's going to be helpful for example if you want to use some simulation tools. It's going to allow you to have this robot attached to the world. Okay. where you're going to create the object and different robot. Okay, so I usually do this when I have a robotic arm. I often do this. I create a virtual joint from world to base link and that's fixed. Okay, there's not much more to do. Just click on save and we have our virtual joint. That's it. Then we're going to go to planning groups. Okay, this one is very important. And the planning group here, well, we have a sixaxis robotic arm. So we have a group of six joints that we need to create. And so move it is going to create motion planning for this group. We're going to click on add group. And let's say uh we need to give a name. Let's say arm. Okay, that's an arm. We're going to choose a kinematic solver. And you're going to choose KDL kinematics plug-in. All right, you can leave this as uh it is. So the default values then we don't need to worry about this. And we are going to add the components to the group. So we can click for example on add joints. And here we're going to start from well we only really have six joints to control. Okay. But I'm also going to add the two virtual joints that we have here. So I'm going to click on this and then shift until the hand tool joint. I'm going to select all of them and then click on this arrow to put them on the right side. Okay. And then I do save. Okay. So you see I have an arm group with all those joints. And you see fixed and then we have six revolute. The joint six was actually continuous but here it's written revolute. It's okay. All right. And uh well you see I have one planning group. Okay. That's very important. And now that we have created this planning group, maybe you can notice that here on the left, we had some steps that were disabled, but now everything is enabled. And so uh if I put the collision, you see this is the collision. This is the visual. So the planning group, the arm is the whole thing. Okay. When we will add a gripper later, we're going to have two planning groups. For now, we just have one. Then we go to robot poses. We can create some poses for the robots. This is quite convenient when I create some poses and give them a name. And so later it's going to be easy to make some tests between different poses. So let's click on add pose and well everything to zero. I'm just going to name it home for example. You could define any home position with any joint position as you want. Here I'm just going to say that this is the home position. So I select the planning group arm. I say home everything to zero. save. Then I'm going to create, let's say, a new one. Let's call it pose_1. And well, let's just uh let's just for example do this um here. Let's just add a pose just like that. Okay, so that's going to be the pose one. I save. And then let's add another one. Let's call it pose two. Okay. So I put some random values. It's okay. Like that. Okay. Maybe this one here. And then like this. Okay. It It's just random poses. Okay. So I can make the robot move saying I want to go to pose one or pose two. I'm going to save. Okay. So you see I have my pose. So the home pose one and the pose two. All right. So we can just save this. I will also show you later on how you can add directly some

Segment 8 (35:00 - 40:00)

poses into the configuration file without having to do this here. Then we're going to go to endectors. And here well we don't have a gripper. So if you click on add endector you can see we could put a name and then an endector group but we don't have a group for the gripper yet. Okay. And um parent link here. Well would be the two link and then you would have a group for the gripper but we don't have that yet. I'm not going to do it. Then I'm going to go to passive joint. So if you have any passive joint that you don't want to control. So here we have six revolute joints. But if there is one that is passive, okay, uh you can add it here. We don't have passive joints. We don't have any. So we're just going to go to the next one. Rust to control ULF modifications. And so here, well, if you already know ROS to control, then you will understand what this is about. But if you don't know, it's going to be a bit of black magic. So ROST2 control is the bridge between the software. So between RO2 and the hardware and basically when you use RO2 with hardware you will use ROS to control. So I have a complete course on ROST to control that you can check if you want but here the good thing about move it with this move it setup assistant is that it gives you already the ROS to control configuration. You don't need to do much actually. So that's quite a good news and we're going to use roster control but we're not going to do that much. We're going to use what uh this package is giving us. And so we need to specify command interfaces and state interfaces for each joint. So how do we want to control the joint here? We want a position control. Okay, if you wanted velocity control, you would put velocity. For example, if you are controlling a wheel, that would be a velocity control. Here it's a position control. And then the state interface, we're going to read what? the position and um well, I'm going to remove the velocity here. Okay. So, we're going to have position control and position feedback. I click on add interfaces. And you see that for each join, so there's going to be some additional tags in the URF. You see for join one we have a comment interface position and a state interface position with also some initial values. All right. So basically you see we have this from joint one to joint six. Okay. This is something you need to do for ROS to control. I'm going to come back to this a bit later. Okay. So you can just check position position. Click on add interfaces and that's it. Then we go to ROS to controllers and well actually for ROS to control we have what we have the hardware interface with the command and the state interfaces and then we have the controller. So the controller is going to receive the command from move it. It's going to do some interpolation and stuff like that and it's going to send this command to the hardware through the hardware interface. Okay. Okay, so we have two things in roster control. The controller part and the hardware interface part. Now for the controllers, well, you just need to click on this and that's it. Okay, so it's going to create an ARM controller with the type joint trajectory controller. And so this is basically what move it is going to send somewhere with a topic or actually an action. And then we have a controller that's going to be loaded automatically. It's going to handle everything. We're going to go also to move it controllers and just click here. Okay, so it's going to create an ARM controller with the roster controllers and the move it controller. So this one is going to uh send the command to the roster controller and it's going to also use the hardware interface. Okay, so once again, if you've never worked with roster control, this is going to be a bit of black magic for you. But I'm going to come back to this a bit later. So with more details, okay, so make sure you have all of that. And then we go to perception. If you have a 3D sensor with so 3D perception and stuff like that, uh you could for example with point cloud or death map, you could configure that here, but we don't have any. Okay, so we're going to go to launch files and you can just keep all of them. Okay, we're going to create all the launch files. We only really need the move group and the demo, but let's just keep all of them. It's not going to be an issue. Then you go to author information and you might be tempted to leave it empty, but if you leave it empty, I think you're going to get an error in the next step. So let's just put whatever. You can put todo if you want and email todo@to todo. com. Okay, just make a valid email with the at and dot something. You can put your name if you want, of course. And then we go to configuration files. and you're going to need to check where you want to

Segment 9 (40:00 - 45:00)

save this package. So, we're going to browse and let's go to source. Okay, let's click on okay. And actually, no, not my robot description. We're going to write here my robot move it config. Okay, it's going to create a my robot move it config folder that's actually going to be a package and in this package it's going to add all of those files. You see we have a package doxml. We have a symmetx and then we have config folder with some stuff and a launch folder. Let's click on generate package. Okay, you may have some warnings. For example, no endectors have been added. That's normal because we haven't added the gripper yet. Let's click on okay. And then you see configuration package generated successfully. If you don't have that, then make sure you fix all of the errors that you could have done in the previous step. And don't close the window, okay, for now before you save the files because if you close the window, you're going to lose all your progress. Now what I'm going to do is I'm going to go back to my workspace and you see I have now a new package my robot move it config with everything okay with all the different files. And so once you have this then you can if you want you can close uh you can click on exit for example and exit the setup assistant. If you ever want to modify this through the setup assistant, you just start it again and instead of creating a new move it configuration package, you do edit existing. You browse. So you browse, you see, you should cancel. You should browse where you have the move it configuration. So ROS to workspace source move it config should be here. Let's load the files. Okay. And you see we have everything again here. Okay. So that's how you can come back to an existing move it config. I'm going to save and you see that are you sure to want to exit because if you do that you're going to lose all the new progress. Click on okay. All right. And we have the new move it config package. You have already made a lot of progress. Congratulations. Now we are more than halfway through the crash course. I hope that you're learning a lot and I also hope that you like the crutch course. If you find it useful, then you might want to check out my bigger move it to course which contains more than 7 hours of structured video lessons and which will take you much further into the understanding of move it to. In this course, you will also learn how to create the URF from scratch, use the move it python and C++ API and connect move it to your hardware with Ross to control. Well, I will leave a link in the description if you're interested. All right, and let's continue with the video. We have used the move it setup assistant and now we have a new package. So, actually, let's just go through this package and let's see what are the files that we have. Okay, that's going to be a quick overview. I'm not going to go into details for everything, but you will know basically where to find the information and maybe how also to modify stuff without having to start the move it assistant again. So, first of all, we have the package. xml. Okay, probably don't need to do anything here. We have the cement list. txt as you can see, which is installing the launch folder for example and the config folder. Okay, so nothing really special here. And then we have config and launch folder. So let's go to config and we have quite a lot of things. Let's go to the files one by one. So we have the initial positions. So if we are using the fake system. So you will see that with move it we can use the fake system basically it's going to be a kind of a simulation or we can use the real hardware or gazebo or something else. But if we are just testing move it with what they call the fake system, then those are going to be the initial positions for each joint. So here it's zero everywhere. Then we have joint limits here. I'm going to come back to this. But we have a default scaling factor for the velocity and acceleration. So between zero and one. 0. 1 means 10%. Which means that by default your robot is only going to go at 10% of the speed of the maximum speed. Okay? It's just so that you can test and if you test with real hardware, uh it can be a good idea to reduce the speed just in case the robot is doing some weird behavior. At least it's going to be slow when you can stop it on time. And then we have joint limits for each joint.

Segment 10 (45:00 - 50:00)

Uh actually we're going to fix that very soon. You can see do we have velocity limit? Do we have acceleration limit? And then we have some value. So here it's in radian/s. Okay. So it's going to be one radian per second limit for each. You see for the joint six it's a bit different because we had a continuous joint. Well, we're going to see that a bit later. Then we have kinematics with the kinematic solver, the KDL kinematics plugin. Okay, don't need to touch anything here. We have the move it controllers. Okay, move it. Simple controller manager with the arm controller and the type and the joint. Okay, this there's no need to do anything here. We have the ar config for when we're going to start the demo. So no need to do anything here. Then we have you see the ROS to control tags for the UDF. So that's going to be added to the URF actually. Okay. So you see we have the hardware interfaces for each joint here. command interfaces position state interfaces position with default values and also we use a well here we use a mock component okay for simulation all right so this I'm going to also come back to this later when we use the real hardware then we have and I would say this is probably the most important file we have the myroots srdf so this is yet a new extension and this is going to be the extension used for move it and here you can see we have the robot name my robot and Then we have most of what we have defined in the move it setup assistant. So we have defined a group named arm with all those joints. All right. So if you want to modify the group, you can also modify here directly or you can add another group without having to go back to the assistant. And then we have defined some you see home pose one pose two with those values. Okay. So once again you can easily modify this. If you want to add, remove or modify some poses, you just do it here. All right, we have the virtual joint that we have created between the world and the base link. And then we have all of the disabled collision tags. Okay, that was the first step. Okay, with the adjacent never in collision. Okay, so most of the information is here. And if you modify it and you build again, then this is going to be taken into account from this file. Let's continue. We have the Zacro file. So this actually is going to be the main URDF file used uh when you start the demo. And what it does, as you can see, it's going to include my robot URF. zacro from the description package. So it's going to include our main URF file which contains the common properties and the ARM with all the links and the joint. All right. And on top of that it's going to add the ROS to control configuration here. Okay. So the UDF file now is the robot that we had plus some ROS to control tags. And then to finish well we don't need to worry about this one. And we have the ROS two controllers. You see this is used by ROS to control with the update rate in Hertz. So that's 100 times per second and we have a controller for the joint states. Okay, so we can publish the join state and make the robot state publisher work correctly and publish the TF. And we also have the ARM controller. Okay, which is going to receive the command from move it and execute that comment plus some configuration for the ARM controller with the name of the joints everything. But you can see everything is already configured for you. All right. So to recap here, the most important file would be I would say the SRDF with most of what you've configured and you can modify this. Then we have a URF file that includes some ROS to control configuration. We also have some ROS to control parameters for the controllers and also move it controllers. So this you don't really need to modify. And we also have stuff like the join limits and the initial positions that you can modify as well. And then you need of course to build source and run again. So that's it for the config. In the launch we have well we have several launch files but the two that are going to be interesting for us is the move group and the demo launch py. As you can see uh it doesn't really contain the launch instructions here. It's a move it configs builder stuff. Okay you can see generate move group launch. Uh this is going to go to another file and well you can see that it's actually quite long. Okay, there's a lot of stuff. Uh but what you need to know is just that the move group launch file is going to start move it. So when we actually create our own launch file and we want to start

Segment 11 (50:00 - 55:00)

move it from there, we're going to need to include this launch file. And then what we're going to do in the next video is we're going to actually test this configuration package and we're going to start the demo. lunch. py. And well then you have actually you have the setup assistant that you could start to just modify this package directly. And then you have all the launch files. You don't necessarily need them but it's not a problem to generate them. So well they are just here. All right. And that's basically it for this quick overview. Let's now test this new movie package that we have. So what we want to do here is from my robot movie config. We want to start the demo. py launch file. So that's what I'm going to do. At first we need to of course build the workspace. So we need to build this package. Uh I'm going to just build everything. Okay. the description and the move it config and then source install setup bash. Now you might think that well we have just generated a package and we have a demo launch file it should work out of the box right and actually it's not going to work. So we're going to start it. I'm going to show you the error and we're going to fix the error so that we can actually run the demo launch file. And so let's do ROS to launch my robot move it config and then demo launch py. So a is starting and well there is nothing here and you see we have some errors and if I can find the error okay so it's here you see parameter robot description planning join limits join one max velocity has invalid type expected double got integer. Okay. So if I go back to actually the config and the join limits here, this should not be a integer number. It should be a float number. Then you might think why does the move it setup assistant just give you an integer here if then move it expects a double number and well I don't have an answer for that. Maybe they thought that ROSS was not complex enough so that they added an extra level of complexity. So you have to debug even the demo launch file. And so what I'm going to do is well I'm going to put 1. 0 everywhere like that. Okay. And I'm also going to put true uh for the joint six and 1. 0. Okay. So, one region per second for each joint. And I think that well, just to be sure, I'm also going to put the acceleration limit. Okay. So, I'm going to put true. Oops. Here, cuz it might lead to more errors. And I'm going to put 1. 0 as well for the acceleration limit. You can use those default values. And then you can put more or less depending on the robot that you have. I save and that should be okay. All right. So just put everything to true and you put a max velocity and max acceleration that is a double number not an integer. So we stop. I am going to build again source and run. And there's going to be something else to fix. But now it starts. Okay. So you see what do we have in the logs with lots of stuff but you see we are configuring the fake system here. So that's the ROS to control configuration and then some more move it uh stuff with the planning adapter and stuff like that. Okay we are loading all of the move group functionalities. You see you can start planning now. If you see this is quite a good sign. And then we are loading the different controllers. So the ARM controller and the joint state broadcaster and if you see this well it looks good and a is here actually and so you see this is what we have and maybe I can close that one and on this view we have you see motion planning and so what we can do is what on the actually context we have OM planning we're going Select a planning group. Uh start state I'm going to say current state and the goal state you see here for example I can choose pose one. So we want to go from here to there. Then I

Segment 12 (55:00 - 60:00)

can do plan and you see it is planning the uh motion here for the robot. So and it's looping here and you see successful. But then we can do execute to actually make the robot move. And this is where we're going to have an error. So still moving because it's the past planning. But then you see we have an error because well the controller could not actually be found. And for this well I'm going to give you the solution because it's hard to find. You could list controllers. You could list the actions that are running. So all the actions, the topics and the controllers and you will see that there is a problem with one of the name spaces. So I'm going to go to move it controllers and in arm controller here we have type joints and then we can add another action ns. So inside arm controller so action name space that's going to be follow joint trajectory. All right. And there's one more argument I'm going to put. So, one more parameter default true. So, you just add this. That's a quick fix so that the demo can work. And then we can go back and let's do a build source and run again this time. So, I'm going to bring again Here RVs and let's remove that as well. Let's do so we have MPL. We select the um current state and then let's say pause one. We do plan. It works as before. And then we do execute. And you see that now it is working. So the arm here is moving. is moving very slow because we are only at 10%. You see velocity scaling 10%. What you can do if you think that this is annoying to see the loop here for the planned path you go to plan path and you can remove loop animation. Then we can increase the let's say we increase the velocity scaling to 100%. Or less as you want. Let's say we wanted to go to post two. Okay, we're going to do So you can do plan and then execute, but you can also do plan and execute. So this is the planning and then this is the execution. All right. And then you can also if you want you can modify, you can move this here. Okay. And we can do um here plan and execute. Okay. So I encourage you to play a bit with this. Okay. to get familiar with this and just try different combinations. There's one thing that we're going to do also is to do a cartigian path because by default well move it is going to make the robot move and all the joints move but the if we think of the last point I'm going to call the endector tool. So the tool point here is not necessarily going to move in a linear way. Okay, it could be a round trajectory. If you want to move in a linear way, you're going to use the cartisian path. Not that if you use this, you're adding more constraints and so move it might not find a valid path. For example, from this, if I want to go to pose one, I don't think it's going to work. If I put cartision path, you see it's starting to plan. But from this point we get to what's called the singularity and we cannot go further. Okay. So if you use the cartision path you might be more limited. So if I remove the cartision path now you see it's going to work. I am going to put here on the plan path. I'm going to put the show trail. So you can put show trail okay to see the trail for the trajectory. And then what I can do also if I go to links maybe tool link show trail. Okay. And let's just do a plan and execute. All right. And you could see the trail but it disappeared. So actually I'm going to not go in the planned path but I'm going to go in the scene robot and then scene robot let's say two link show trail can show the axis if you want

Segment 13 (60:00 - 65:00)

let's go back to the post two let's do plan execute and you can see now okay we can see more clearly we have the trail or the tool link so that can be quite useful okay to see where exactly the robot is going. And now let's say I'm going to use the cartisian path and I'm going to give a simple I'm just going to go up a bit here. Okay, should work. Should be fine. Let's do plan and execute. Okay, you see the robot has moved and the robot has moved. You see the tool link has moved in a linear way. Then let's say uh I don't know if I can go much. Okay, maybe like this. I do plan and execute. Okay. And you see now the trail is linear. Okay. If I didn't use the cartision path, maybe the motion plan would have been different and be a bit more like this going up and down or like this. Okay. So this is an option we're going to come back to later. Okay, it's quite useful. And one thing to note is that with a six axis robotic arm, you can do cartisian path for small distances, but if you want to do bigger ones and soldering, for example, then you might need a seven axis robotic arm. So you're going to add one extra axis, one extra joint. That's going to create some redundancy, but thanks to this redundancy is going to improve the chances of success for the planning of the cartisian path. All right, and that's the end of this move it to crash course. I hope you could learn a lot and get a better understanding of how move it works. So to recap, you started from a URF describing a six-axis robotic arm. You have added collision tags and then configured the robot with the move it setup assistant. At the end you could see the robot move on aries and give different kinds of move it comments. Now you might wonder how can you create the URL from scratch and apply that to your own robot. Also how can you connect a roster application to this move it package and how to connect move it to real hardware. Also how to add an endector tool like a gripper to the arm. Well, that's exactly what I cover in my full movie to course, which contains seven hours of video content, additional practice activities, and downloadable code templates that you can use for your own projects. If you're interested, you can find a link in the description. And if you like the way I teach, you will love this course. Here is actually an overview of what's inside the course. So, here I am inside the course and you can see we have total we have 10 sections. Okay, in the first two sections there's going to be introduction. You will get also more insights about what is movie tour. So why do we need it? And then we're going to do a full installation with Rosto movie 2 and some additional tools. Then the section three is actually how to create the UDF for the six axis robotic arm. So the UDF that I gave to you at the beginning of this crash course, well here we are going to do it from scratch. Okay, you will get a complete review of the process of how to actually write a URDF with links and joint and then we are going to write the URDF together also using Zacro. All right. So with this you will be able to also use URDF for your own project. Then the section four is basically what we have done in this crash course. Okay. To add the collision tags and to configure the robot for move it and also how to launch the demo launch file. Then you can see that we are adding a gripper to the arm. So we will add the gripper to the UDF. We will also configure the gripper with the move it uh setup assistant and you can see that in the end we will have the gripper here and we can also do some motion planning for the gripper. We can open the gripper and we can close it. After that we're going to create a bring a package. So you can create your own launch file. Okay. So we won't need to start the demo launch file. You can create your own launch file for your own application. And then it's time to use the move it API. So there's one section for the C++ API and Python API. Here you're going to learn how to do a joint pose, a goal post, a cartonian path. We are going to integrate the C++ API inside an object oriented programming node. And we're going to end here with a complete template that you can use in your own applications to bridge well your Russo application to the move it command. All right, so that's the C++ the Python one and finally we also have a section on how to connect move it to the hardware. So, a quick ROS to control recap and then I'm going to give you an hardware interface and you're going to see how to plug this hardware interface to your existing move it configuration. All right, so there's much more in this course and that's a really complete move it course. So once again, you can find the link in the description and thank

Segment 14 (65:00 - 65:00)

you for watching. I hope to see you in the course.

Другие видео автора — Robotics Back-End

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник