Using moveit! alongside ros_contol
Hi guys,
I want to use moveit! with my simulated robot over Gazebo 2.2 and ROS indigo.
So, I've launched moveit! setup assistant, made a configuration package for my custom robot and changed my 'roscontrol' controllers to be of type: "positioncontrollers/JointTrajectoryController", like so (this is my yaml file):
arm_controller:
type: "position_controllers/JointTrajectoryController"
joints:
- komodo_base_rotation_joint
- komodo_shoulder_joint
- komodo_elbow1_joint
- komodo_elbow2_joint
- komodo_wrist_joint
gains:
komodo_base_rotation_joint:
{p: 400.0, d: 0.0, i: 0.0, i_clamp: 0.0}
komodo_shoulder_joint:
{p: 400.0, d: 0.0, i: 0.0, i_clamp: 0.0}
komodo_elbow1_joint:
{p: 700.0, d: 0.0, i: 0.0, i_clamp: 0.0}
komodo_elbow2_joint:
{p: 700.0, d: 0.0, i: 0.0, i_clamp: 0.0}
komodo_wrist_joint:
{p: 400.0, d: 0.0, i: 0.0, i_clamp: 0.0}
From here, I launched Gazebo with my robot (as usual), the controllers loaded successfully, with the following topics:
/komodo/arm_controller/command
/komodo/arm_controller/follow_joint_trajectory/cancel
/komodo/arm_controller/follow_joint_trajectory/feedback
/komodo/arm_controller/follow_joint_trajectory/goal
/komodo/arm_controller/follow_joint_trajectory/result
/komodo/arm_controller/follow_joint_trajectory/status
/komodo/arm_controller/state
Now, when I launch "moveitplaningexecution" I get these errors:
[ INFO] [1427391777.591530773, 16.714000000]: MoveitSimpleControllerManager: Waiting for arm/joint_trajectory_action to come up
[ INFO] [1427391782.603431714, 21.714000000]: MoveitSimpleControllerManager: Waiting for arm/joint_trajectory_action to come up
[ERROR] [1427391787.615310407, 26.714000000]: MoveitSimpleControllerManager: Action client not connected: arm/joint_trajectory_action
[ INFO] [1427391787.683849921, 26.782000000]: Returned 0 controllers in list
[ INFO] [1427391787.699500489, 26.797000000]: Trajectory execution is managing controllers
Rviz then launches, and I can plan trajectories, However once I attempt to execute them, I get:
[ INFO] [1427393489.592196869, 62.858000000]: Returned 0 controllers in list
[ERROR] [1427393489.592233438, 62.858000000]: Unable to identify any set of controllers that can actuate the specified joints: [ komodo_base_rotation_joint komodo_elbow1_joint komodo_elbow2_joint komodo_shoulder_joint komodo_wrist_joint ]
[ERROR] [1427393489.592254160, 62.858000000]: Known controllers and their joints:
[ERROR] [1427393489.592284538, 62.858000000]: Apparently trajectory initialization failed
Obviously, I'm missing something here..
- Am I responsible to implement 'JointTrajectoryAction' server? Isn't 'ros_control' implement it for me, by choosing "JointTrajectoryController" type?
- If I do need to create one myself, can someone please point me to a simple example?
- Can someone please elaborate on how Moveit! should interface with ros_control?
Many Thanks,
David
Asked by davidx on 2015-03-26 13:34:04 UTC
Answers
I have the same problem ... I am creating moveit package Gazebo simulation and controllers for controling real robot. https://www.youtube.com/watch?v=aZYC8IAiYCk I hope I will find some solution in a month and when I did I will write full documentation and tutorial for my work because I think there is a lack of documentation about moveIt implementation. Now I can only help you with this
- MYRAbot's arm control (bioloid+arduino)
- MYRAbot's arm model for simulation (urdf+gazebo)
- Integration of MYRAbot in moveIt! (gazebo+moveIt!)
It is full example of creating motor arduino drivers then Gazebo simulation and MOVEit + Gazebo + real robot control. Syntax is littel bit different because it is older ROS version but I hope it could help you to better understand the point of controling real hardware and simulation with moveit. It helps me a lot. You should also look at this tutorials http://wiki.ros.org/actionlib/Tutorials and better understand the action server. Here is good example how action server ros_control and moveIT works together http://www.seas.upenn.edu/~juse/tutorial/ckbot_moveit.html but first you need to better understand the acion lib.
I hope I will find solutions for my project too and then I will be able to give some documentation too.
I already created controllers for my robot, Gazebo simulation and moveIT package now I am working on joint trajectory action because it is something new for me too
Sorry for my english and happy new year :) I hope the links will help you and I will update new solutions later
Asked by Chickenman on 2015-12-31 14:24:04 UTC
Comments
I agree on missing documentation, also see http://answers.ros.org/question/223149/custom-robotic-arm/
Asked by Humpelstilzchen on 2016-01-01 04:53:10 UTC
Minor edit: it's Gazebo, not gadzebo.
Asked by gvdhoorn on 2016-01-01 05:52:22 UTC
HI!Chickenman and gvdhoorn, I have some questions in controlador_brazo.cpp In the program you subscribe the topic "pose_arm",and it is come from topic "brazo/joint_states" How did you get the calculated trajectories from moveIt ? In my topic "the joint_states" just show the final joints position.
Asked by peterlin300 on 2017-05-15 10:30:52 UTC
It is very thankful if you can send the answer to my email peterlin300@gmail.com I also want to use gazebo and moveit to control my robot,and i have some other questions.
Asked by peterlin300 on 2017-05-15 10:35:22 UTC
Comments
Did you find a solution to this problem yet? I am struggling with the same problem.
Asked by Zubin Priyansh on 2015-12-31 07:23:24 UTC