ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This really is a non-trivial task you're trying to undertake. The challenge is reactive velocity control of the arm as opposed to deterministic goal based control. This is still an active research topic as far as I'm aware.
MoveIt has the ability to perform basic velocity control, but this will result in extreme behaviour near singularities which will throw your UR5 into safe mode. I have personal experience of doing exactly this.
Can you answer a couple of questions:
Are you using a wrist mounted camera or a statically mounted one?
Do you need the arm to follow the marker in real time?
2 | No.2 Revision |
This really is a non-trivial task you're trying to undertake. The challenge is reactive velocity control of the arm as opposed to deterministic goal based control. This is still an active research topic as far as I'm aware.
MoveIt has the ability to perform basic velocity control, but this will result in extreme behaviour near singularities which will throw your UR5 into safe mode. I have personal experience of doing exactly this.
Can you answer a couple of questions:
Are you using a wrist mounted camera or a statically mounted one?
Do you need the arm to follow the marker in real time?
Edit:
To implement real-time tracking you need to use velocity control of the arm. This is not too complicated to implement if you ignore the problem of singularities, I'll describe the theory below.
You'll need to create a control law that determines the desired angular and linear velocities of the end effector based upon the relative position of the marker. The velocity should be higher the further away the end effector is from its desired location, and you'll want a dead zone around the perfect position to avoid it oscillating around this.
Once you've got this desired velocity (twist message type), you'll need to get moveit to calculate the Jacobin matrix of the manipulator at its current location. This matrix can be used to translate the velocity of the end effector into a vector of joint velocities.
Now you simply pass these joint velocities to the UR driver to control the arm.
One limitation of this method is it will happily run straight into a singularity, solving that is a whole new problem. Hope this helps.