Use several UR arm with one robot and UR5KinematicsPlugin
I'm building a robot which is made of four ur5 arms. So I created a folder with every packages needed (ctrl-botgazebo, ctrl-botdescription, ctrl-botmoveitconfig). I spend time configuring and now I can do plan planning with RVIZ+Moveit for each arm of the robot.
After days of configuration everything can work (almost everything). I can do path planning and see in gazebo the movement. When I try the UR5 alone I found that this solver is amazingly fast (less than 100ms most of the time) compared to kldkinematicsplugin/KLDKinematicsPlugin
My problem is that I can't use the urkinematics/UR5KinematicsPlugin because I added a prefix to each arm (N1, N2, N3, N4_). So to build my robot I load 4 times a ur5 arm with 4 different prefixes in my robot's urdf.
If I choose the urkinematics/UR5KinematicsPlugin for my robot I get some error : I launch roslaunch ctrl-botmoveitconfig ctrl-botmoveitplanningexecution.launch sim:=true
Then I get this
[ERROR] [1431072866.823796592, 3808.550000000]: Kin chain provided in model doesn't contain standard UR joint 'shoulder_lift_joint'.
[ERROR] [1431072866.823849841, 3808.550000000]: Kinematics solver of type 'ur_kinematics/UR5KinematicsPlugin' could not be initialized for group 'N1_manipulator'
[ERROR] [1431072866.824097006, 3808.550000000]: Kinematics solver could not be instantiated for joint group N1_manipulator.
It seems than the solver is reverted to default because urkinematics expect the name without prefixes. However if I look at urkinematics/src/urmoveitplugin.cpp :
ur_joint_names_.push_back(arm_prefix_ + "shoulder_pan_joint");
ur_joint_names_.push_back(arm_prefix_ + "shoulder_lift_joint");
.......
It looks like it can be used with prefixes, but I have no clue of How to do it.
The kldkinematicsplugin/KLDKinematicsPlugin need 3 seconds or more to compute and can fail a lot of time. Even if I enable replanning.
So my goal is to be able to use urkinematics solver but with my robot. I don't understand why urdescription is designed to be used with prefixes but the ur_kinematics solver is not. Maybe I'm missing something obvious.
Asked by Arowana on 2015-05-08 03:30:57 UTC
Answers
It's a bit messy, but perhaps ros-industrial/universal_robot/pull#168 can help. It was never merged, but it does show how ~arm_prefix
can be configured for ikfast plugins.
Issue is that moveit_ikfast plugins get loaded more than once, and need their parameters to be defined as private parameters of the node they get loaded by. See also Re: parameters for ikfast plugins using private NodeHandles on moveit-users
.
PS: "a robot made up of four ur5 arms"? You cannot make a statement like that and not provide us with a screenshot :).
Edit:
Thank you, doesn't look very straight forward. I hardcoded my prefix in ur_kinematics/src/ur_moveit_plugin.cpp to try. I was wrong, the computation time is now the same.
The PR contains many more changes than needed. In fact, I think only the change to moveit_rviz.launch is something you could use (but you'd need to make sure other instances of the plugin (such as in a move_group
) also access that parameter).
Asked by gvdhoorn on 2015-05-08 03:39:47 UTC
Comments
Thank you, doesn't look very straight forward. I hardcoded my prefix in ur_kinematics/src/ur_moveit_plugin.cpp to try. I was wrong, the computation time is now the same. It may be because I have 4 arms so the collision computation is more time consuming. The planning failure rate is almost the same
Asked by Arowana on 2015-05-08 04:12:08 UTC
For the screenshot I'll do it. but it's an ugly robot with 4 arms and a box between. The problem is that I aim industrial application and the motion planning is not reliable, I feel a bit stuck...
Asked by Arowana on 2015-05-08 04:14:50 UTC
Have you checked ros-industrial/universal_robot/issues#193 and the related ros-industrial/universal_robot/pull#196?
Asked by gvdhoorn on 2015-05-08 04:18:13 UTC
I did the line deletion suggested in the ticket https://github.com/ros-industrial/universal_robot/pull/196 and now it's using RRTconnect and 40 times faster (from 2 seconds to 0.05), no more failures. However if I move the arm to a tricky position to path plan to another position it gets stuck.
Asked by Arowana on 2015-05-10 22:00:11 UTC
However if I move the arm to a tricky position to path plan to another position it gets stuck.
stuck as in? For planning related questions, I'd recommend you send a message to moveit-users, as they may know more.
Asked by gvdhoorn on 2015-05-11 01:32:14 UTC
Comments