ros2 conrtol my machine and arm some motor axis
I have 2 machines,
1,one has the same structure as a 3D printer, 3 motors, XYZ axes, how to use ros to control it, is there any motion control package?
(I use this kind of screw slide table for 1, 2, and 3 axes)
2,The other is 6-axis, of which 1-axis, 2-axis, and 3-axis are XYZ of the Cartesian structure of the 3D printer(Same structure as in the first question);
4-axis, 5-axis, and 6-axis mechanical arm joint structure.
Such a mixture, how should I use ros control? Can ros contorl and moveit work?
Asked by zouzhe on 2023-08-01 03:31:48 UTC
Answers
MoveIt will most definitely work, I invite you to take a look at their tutorial on integrating a new robot. Where you would struggle a bit would be the definition of the hardware_interface for the robot, which would essentially allow ros2_control to be able to send control commands over to your system and read the joint states.
There are tutorials and relevant literature online that would help you write your own hardware interface. I do not know if your linear actuators come with encoders, if not, you would have to think about how you would provide feedback to the ROS side.
If you already have motor controllers with you that you use to control your machine, you can look at how you can adapt your controller to be able to speak to ROS (usually it is UART over USB) . If not, you can search for some sort of motor controller that already has a ROS interface - like the Maxon EPOS Series of controllers.
Something like this might serve as a good starting point for a robot with 3 prismatic joints:
<robot name="3prism_robot">
<link name="base_link" />
<joint name="base_footprint" type="prismatic">
<parent link="base_link" />
<child link="link_1" />
<origin xyz="0 0 0" rpy="0 0 0" />
<axis xyz="0 0 1" />
<limit lower="0.0" upper="0.5" />
</joint>
<link name="link_1">
<visual>
<geometry>
<box size="0.3 0.3 0.05" />
</geometry>
</visual>
</link>
<joint name="link1_to_link2" type="prismatic">
<parent link="link_1" />
<child link="link_2" />
<origin xyz="0 0 0.15" rpy="0 0 1.57" />
<axis xyz="0 1 0" />
<limit lower="-0.15" upper="0.15" />
</joint>
<link name="link_2">
<visual>
<geometry>
<box size="0.1 0.1 0.3"/>
</geometry>
</visual>
</link>
<joint name="link2_to_link3" type="prismatic">
<parent link="link_2" />
<child link="link_3" />
<origin xyz="0 0 0.1" rpy="0 0 0" />
<axis xyz="1 0 0" />
<limit lower="-0.1" upper="0.1" />
</joint>
<link name="link_3">
<visual>
<geometry>
<box size="0.2 0.05 0.05"/>
</geometry>
</visual>
</link>
</robot>
Asked by sampreets3 on 2023-08-03 02:57:24 UTC
Comments
thanks,i have make a motor package about EtherCat Servo Motor. and i can send trajectory msg to this package, motor can work!
What I am really confused about is that all the tutorials I see online use 6 joints, without my structure, so I don't know what to do
Asked by zouzhe on 2023-08-03 04:09:25 UTC
What you have (in terms of URDF and SRDF) are 3 prismatic joints, and 3 continuous joints. You can start by creating a URDF model that has the same configuration. Then slowly you begin integrating more and more complexity into it.
I have updated my answer with an example URDF. You can use that as a starting point
Asked by sampreets3 on 2023-08-03 04:41:27 UTC
Thank you very much. The structure I mentioned originally has a specific name, and Moveit has a specific class. I will study it carefully. Thank you.
Asked by zouzhe on 2023-08-03 05:43:22 UTC
Hello, I have another small question, which is where does the information in the code above, type="fundamental", come from? I couldn't find any types on the moveit doc. Thank you very much
Asked by zouzhe on 2023-08-03 05:54:06 UTC
I do not see the type named fundamental mentioned in my code sample. In case you want information on what types of joints are allowed in URDF, you can find them here
Asked by sampreets3 on 2023-08-03 06:38:12 UTC
Comments
help me,thanks
Asked by zouzhe on 2023-08-02 04:54:22 UTC