moveit2 icon indicating copy to clipboard operation
moveit2 copied to clipboard

Extract the desired movement of one joint from the plan generated

Open sampreets3 opened this issue 2 years ago • 4 comments

Issue

Hello,

I am currently working on a project which uses a Doosan A0509 collaborative robot arm on top of a custom mobile base. The mobile base is as of now a separate entity, controlled by sending signals through push-buttons. What I am able to do is add the mobile base as a prismatic joint in the srdf, and include the particular prismatic joint in the planning group. This enables me to be able to generate a trajectory which involves a certain amount of movement for the mobile base.

What I found that I can do is I can connect the electrical signals necessary for the control of the mobile base to the Doosan robot control box, and use the services provided by doosan to set and reset outputs of the robot. This would enable me to control the mobile base with the Doosan robot.

My point of struggle at the moment is trying to figure out how I can extract a part of the plan, retrieve the amount of distance I need to move the mobile base, and send the appropriate signals to the control box output. I can even work with a set of TF elements (current TF of mobile base versus the desired TF of the mobile base) , but am currently not sure how I can extract that from the plan.

Any help on this issue would be highly appreciated, and thanks in advance!

Sampreet Sarkar

System description

  • MoveIt2 Foxy
  • osrf/ros:foxy-desktop base image

sampreets3 avatar May 05 '22 09:05 sampreets3

@sampreets3 Sorry for the late reply. I assume you are using MoveGroupInterface? The plan() function returns the robot trajectory with the Plan struct. You can parse the RobotTrajectory values, your base should be represented as linear joint offsets. No need to query TF imo, all you need to do is define the direction of the prismatic joint (positive X?) and read and process the values. If you really need some more advanced planning with the base, I'd recommend reading the corresponding tutorial on mobile manipulation.

henningkayser avatar Jun 02 '22 16:06 henningkayser

@henningkayser , thanks for the reply. I did take a look at the Plan struct and examined the object returned for a standard planning problem (i.e., one in which I know everything will work and I know the displacement each link should make). I will follow your solution and simply extract the value needed to send to my custom controller.

Thanks for the tutorial on Mobile manipulation. Just a quick question tho, is the tutorial compatible with MoveIt2 Foxy? I am working within a docker container, and I'd like to stay with Foxy as long as I can without explicitly needing to upgrade.

sampreets3 avatar Jun 03 '22 08:06 sampreets3

@henningkayser , thanks for the reply. I did take a look at the Plan struct and examined the object returned for a standard planning problem (i.e., one in which I know everything will work and I know the displacement each link should make). I will follow your solution and simply extract the value needed to send to my custom controller.

Sounds good!

Thanks for the tutorial on Mobile manipulation. Just a quick question tho, is the tutorial compatible with MoveIt2 Foxy? I am working within a docker container, and I'd like to stay with Foxy as long as I can without explicitly needing to upgrade.

The required joint model types made it into Foxy, so the tutorial should work in theory. Maybe @DLu knows this better.

henningkayser avatar Jun 03 '22 19:06 henningkayser

Unfortunately, we had to change the control_msgs API to get mobile manipulation to work, and that change was only made in Galactic and later

DLu avatar Jun 09 '22 15:06 DLu