Ask Your Question
0

moveit visual servoing

asked 2017-07-08 13:21:53 -0500

ahmohamed gravatar image

updated 2017-07-10 16:10:50 -0500

130s gravatar image

I've been working with moveit for the past two weeks. However, I am trying to do visual servoing with my robot, but I cannot find any example about moveit with visual servoing. I know that using moveit with API is always plan for the next movement which delays the process.

I try to use my visual servoing with planning in python I get really slow running (2Hz). I change to c++ and I get faster progress which is (10Hz). 10Hz is fine but still, the planning is not required in this process, especially the end_effector move by the small change from the old position.

is there any way I can stop the planning, or just generating the joint angle from the position so I can start with the current position and then add the difference.

I've been thinking about using IK_service but I am not sure if it will be fast enough to do visual servo.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2017-07-09 05:02:30 -0500

gvdhoorn gravatar image

If you already know where you are going -- and are not interested in any of the collision avoidance and other planning features of MoveIt -- I would not use MoveIt, but just host an IK plugin in your own node. Then use that together with an inverse Jacobian or similiar approach to arrive at new joint space targets every cycle. Then send that to your driver.

If you have a ros_control based driver, or one that implements trajectory replacement correctly, you could even use that.

edit flag offensive delete link more

Comments

The issue I have is I am not able to generate the IK for my arm which is 7DOF. I've been trying to generate it using IKfast but I cannot get the IK as always get an error. I thought if I can use moveit IK without planning could help but I don't know from I can start.

ahmohamed gravatar imageahmohamed ( 2017-07-09 05:07:40 -0500 )edit

MoveIt will use whatever IK plugin you have configured. If you don't have an IKFast plugin for your robot, use Trac IK or KDL.

As for generating an IKFast plugin: #q263925. That's for 4dof though. You'll have to tweak the openrave.py command line a bit with > 6 dofs (free joint etc).

gvdhoorn gravatar imagegvdhoorn ( 2017-07-09 05:15:30 -0500 )edit

To clarify: both Trac IK and KDL can be used perfectly fine without MoveIt.

gvdhoorn gravatar imagegvdhoorn ( 2017-07-09 05:16:44 -0500 )edit
1

Also "with MoveIt" is quite broad. You can definitely write your own servoing node that instantiates a moveit::core::RobotState and calls setFromIK on it. That way you can even do collision checking internally if your cycle rate allows for it, by instantiating a PlanningScene too.

v4hn gravatar imagev4hn ( 2017-07-10 12:50:09 -0500 )edit

Sure, that is definitely possible, and we even do it in one of our projects here. Wasn't sure whether to suggest that at this stage, so I left it out.

gvdhoorn gravatar imagegvdhoorn ( 2017-07-10 13:43:33 -0500 )edit

thank you guys for your advice. So far I am trying to use IK_service to do the job. @gvdhoom I will appreciate if you can give me more details.

ahmohamed gravatar imageahmohamed ( 2017-07-10 16:04:25 -0500 )edit

I suppose you mean the compute_ik ros service. This is a bad idea indeed. Have a look at http://docs.ros.org/kinetic/api/movei... instead.

v4hn gravatar imagev4hn ( 2017-07-11 03:55:29 -0500 )edit

@v4hn: I agree. @ahmohamed: the service is not a good idea. Use what @v4hn linked to or load the IK plugins directly.

gvdhoorn gravatar imagegvdhoorn ( 2017-07-11 03:59:50 -0500 )edit
0

answered 2017-07-26 04:09:43 -0500

ahmohamed gravatar image

updated 2017-07-26 04:10:22 -0500

Here is what I do, following the advice of @v4hn by using Kinematic Model I manage to load the model and then compute the IK by providing the position using setFromIK . Using this method I managed to update the current position according to the visual servoing output where I apply a PD controller. This method allowed me to work with 30Hz which is quite fast for my application.

edit flag offensive delete link more

Comments

congratulations :)

v4hn gravatar imagev4hn ( 2017-07-26 04:48:23 -0500 )edit

I wonder how do you send the desired pose/position to the robot via MoveIt? Do you use the "Move Group Interface" (which I presume the planning have to be done)? I have asked a related question from: link.

linshenzhen gravatar imagelinshenzhen ( 2017-10-30 08:53:01 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-08 13:21:53 -0500

Seen: 399 times

Last updated: Jul 26 '17