Hello everyone,
I have been using MoveIt with the Motoman SIA 10D for a few days, it works great! Congratulation to the people from I-ROS and MoveIt.
However my main application was not doing path planning, but "real-time" teleoperation (best effort actually, I'd like to achieve ~50Hz).
This is my setup: I launch the MoveIt application with the controller for my robot (launch file enclosed) and I have a node that publishes a cartesian goal (position + speed).
I have several questions:
1- what message type should I use for the cartesian goal, and were should I publish it? (I was thinking of publishing it as a child to base_link in tf)
2- I am using the constraint aware kinematics solver to compute joint trajectories ;
I want to compute IK position AND velocity to stream them to my robot controller (which supports joint trajectory streaming consisting in timestamed positon/velocity points). There are some compute_ik and compute_fk services in move_group but they seem to be only performing position ik which does not seem sufficient to me. Is there a way to get a handle to the solver and use it in another node? Would it be a good practice or is there a better way (adding a service to move_group, etc.)?
3- I am confused about how rviz shows 3 versions of the same robot but there is only one tree in tf. If I want to show the previous IK solution in rviz, how should I do it?
Thanks
Hello Ioan,
Thanks for the quick response. The main point here is that I want to bypass any motion planning ability in MoveIt and simply stream direct joint positions/velocities. But I need some IK at some point, that the MoveIt motion planning has to use at some point to compute a trajectory.
I actually meant collision aware IK solver and not constraint aware (maybe it's the same).
Flavian
Hello Ioan,
Thanks for the quick response. The main point here is that I want to bypass any motion planning ability in MoveIt and simply stream direct joint positions/velocities. But I need some IK at some point, that the MoveIt motion planning has to use at some point to compute a trajectory.
I actually meant collision aware IK solver and not constraint aware (maybe it's the same).
On Tue, Sep 3, 2013 at 12:55 PM, Flavian Hautbois <f.hau...@gmail.com> wrote:
Hello Ioan,
Thanks for the quick response. The main point here is that I want to bypass any motion planning ability in MoveIt and simply stream direct joint positions/velocities. But I need some IK at some point, that the MoveIt motion planning has to use at some point to compute a trajectory.
I actually meant collision aware IK solver and not constraint aware (maybe it's the same).Still not sure what you mean. Do you mean that you pass in a constraint validation routine for IK?
I think you should use the compute_cartesian_path service provided by move_group; That computes IK, constructs a trajectory and does not hit obstacles if possible (if you ask for that). There is no call to a planner from OMPL.
On Tue, Sep 3, 2013 at 12:55 PM, Flavian Hautbois <f.hau...@gmail.com> wrote:
Hello Ioan,
Thanks for the quick response. The main point here is that I want to bypass any motion planning ability in MoveIt and simply stream direct joint positions/velocities. But I need some IK at some point, that the MoveIt motion planning has to use at some point to compute a trajectory.
I actually meant collision aware IK solver and not constraint aware (maybe it's the same).Still not sure what you mean. Do you mean that you pass in a constraint validation routine for IK?
I think you should use the compute_cartesian_path service provided by move_group; That computes IK, constructs a trajectory and does not hit obstacles if possible (if you ask for that). There is no call to a planner from OMPL.
Flavian,
As far as I know, ROS and MoveIt do not generally use cartesian velocity control as you are describing. Instead, they do position-based control to calculate a joint-space trajectory (series of joint positions), and then calculate velocities, accelerations, and timing for each point to achieve smooth motion based on the robot’s joint vel/accel limits. I don’t think cartesian velocities are ever considered.
If you would like to generate individual joint pos/vel commands from your input cartesian pos/vel control data, then you’ll need to solve for both pieces independently:
1) The cart->joint position can be solved using one of the IK services, as you’ve found.
2) The cart->joint velocity requires a different method. Here are two options:
a) Approximate Derivatives: choose a small time step, and calculate a “future” cartesian position based on the commanded cartesian position and velocity. Use IK to calculate joint positions for both the commanded cartesian position and the “future” position. Take the difference between the current/future joint positions and divide by your timestep to approximate the joint-space velocities corresponding to your cartesian velocity.
b) Jacobian: the manipulator Jacobian relates cartesian-space velocity “twist” vector to joint-space velocities, as described here. Calculate a jacobian for the current robot position. Convert your cartesian velocities into a “twist” vector, such that rotational velocities are expressed as velocities about the coordinate axes (not necessarily Roll/Pitch/Yaw). Solve the equation cart_vel = Jacobian*joint_vel. For simple (6DOF, non-singular) configurations, this is simply joint_vel = inv(Jacobian) * cart_vel. For your 7-DOF robot, you’ll need to solve an under-constrained matrix problem. The Eigen matrix lib is used by ROS and has functionality to do this.
Before you pursue either of these approaches, make sure that this is the correct approach for your problem. There’s some redundant information in the position/velocity/accel/time-from-start fields when generating your trajectories. It’s easy to create trajectories that are “disjoint” between different trajectory segments, resulting in “noisy” motion of the robot. That’s part of the reason why ROS tends to process all generated trajectories through a smoothing filter prior to execution on the robot. You may need to provide a similar on-the-fly smoothing filter in your controller, to get the motion you’re looking for. Consider whether you need to apply this filter in cartesian space, or if it’s just as easy to do the filtering in joint-space, bypassing the cart->joint velocity conversion you’re stuck on.
Hope this helps!
Jeremy Zoss
Southwest Research Institute