ROS2 Gripper Setup for Moveit

I am struggling to grasp how I could get the GripperCommand controller defined in the moveit config controllers.yaml file (I pressume that is where it lives) if I wanted to setup the gripper_cmd to work with ros2_control and not with the gazebo simulation? What would be the best approach - i.e. for making the GripperCommand and corresponding controller in ros2_control

Which course and unit are you working on?

@bayodesegun Just trying to combine what I learned in ros2_control and ROS2 Manipulation Basics in my own toy project using the franka emika robot model to get more hands on but after defining the GripperCommand controller in moveit I get this error

Do I need to setup an action server/client for the gripper command controller?

Okay, thanks for the clarification. Let me ask one of our experts on the subject matter.

1 Like

Hello @roman.smid,

Thanks for reaching out. I would love to give you a direct answer to what is causing this error message but it is really difficult to do it without having all the details of your specific setup (e.g. launch files, configuration files, robot model files, etc…) and without having been involved on the development of the project myself. That being said, let me try my best here:

There are several options that you could use to debug you application.

You can check that you have activated the gripper controllers by running the following command:

ros2 control list_controllers

You could also verify the available actions by typing:

ros2 action list

Compare the results with the action you expect to be provided.

This is to make sure that you have launched the gripper.

Once you have confirmed that your gripper action server is enabled and running you can proceed to further introspect action topic with the command:

ros2 action info <action_name>

Look for the number or action clients and action server on your system.

Also try to perform action calls using the command line tools:

ros2 action send_goal <complete>

Finally I can’t stress enough the importance of reviewing and understanding the content of the different configuration files of your application. They are key in enabling the communication across the different components!

In closing would like to refer back to my opening sentences, as I can only give you general guideline for debugging your application as I am not aware of the specifics of your particular case. Hope this pointers help you to achieve your goal.

Best,

Roberto

1 Like

Hi, @rzegers ,

thanks so much for the advice just a follow up question - is the gripper action server launched by MoveIt itself or do I have to write and launch one myself?

Thanks

Hello @roman.smid,

MoveIt assumes that you have a FollowJointTrajectory action service server for your robot arm running (and optionally a controller for your gripper running). So you have to add that functionality yourself, and write and launch one yourself. MoveIt doesn’t do that for you. In the course ros2_control you learn how to create controller topic publisher or action server for the controllers and how to create launch files for ros2_control. For instance if you are running Gazebo your URDF/XACRO will load the controllers configurations but you still have to write the launch files that activate those controllers.

I hope to have I’ve managed to shed some light on this for you.

Roberto

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.