Hi,
Robotica wrote:Working with the SetStopCondition service I also noticed that setting a stop condition for the gripper (tool_force_threshold) leads to some problems. I took this threshold as equivalent to max_gripper_force, which is 200 N.
The 'tool_force_threshold' is not equivalent to the max_gripper_force. I explained this in the 'StopCondition service' thread which you referenced below. The tool_force_threshold uses the measured external force on the TCP.
Robotica wrote:But when I set this condition, the robot would not move at all from its original vertical position, and the MoveAlongJointPath service provided me with the following StopReason:
Stop Condition 7: total force in direction [0.000000, 0.000000, 0.000000] is 1434.191 N |> 200.0000 N, full force vector: [-1.727565, -20395.262286, 141977.770114] at sim_time 2.190
The high external torque measurements appear due to the singular position of the LWR during the start position. The algorithm estimates the external force on the TCP based on the kinematic / dynamic model of the LWR. This model is subject to singularities when the arm is straightened. You should only specify a tool_force_threshold when the arm is far away from singularities as the error of the estimation is not predictable close to singular configurations.
Robotica wrote:As I understand, the stop condition is given the number 7 because number 0 corresponds to the first joint.
The number 7 indicates that you specified at least eight (8) stop conditions in the SetStopConditions service. The MoveAlongJointPath returned to you the zero based index of your list of stop conditions. In this case the stop reason is the 8th stop condition in the stop condition array you specified.
Robotica wrote:What surprises me is the immense amount of force measured at the gripper, and I had to ask myself whether it is a realistic value or rather an error within the code... Furthermore, the measurements come straight from the simulation but do not correspond to the values provided by the GetEstimatedExternalForce service either.
Due to the reasons described above the measured forces are inconsistent in the singular configuration and can vary in time. The force you receive directly from the simulator is a direct measurement and independent of the kinematic state of the robot.
Robotica wrote:Additionally, I would like to ask one more thing about the stop conditions. Sometimes, when the robot has picked up an object and is moving toward the corresponding target zone, one of the stop conditions may be exceeded and the robot stops with a jerk. This jerking movement then causes the robot to lose the object and the screen turns red indicating task failure. Why does this happen? Is it because the object hits the robot or a similar reason? On stopping due to a red screen, the MoveAlongJointPath service only provides an empty string as the StopReason, which does not offer any explanation as to why the simulation was stopped.
Once a stop condition triggers the robot performs a hard stop in the current configuration. If the robot moved at a high velocity this hard stop will exceed the torque limits and the 'emergency stop' of the robot triggers. The solutions to this problem would be to avoid triggering stop conditions during fast movements (especially the tool_force_threshold in singular configurations). When stopping due to a red screen the MoveAlongJointPath returns the failure in the "error_message" field.
Robotica wrote:... the service call fails and the following error message is printed:
Setting Stop Conditions failed: /home/devel/euroc/gazebo/challenge2_sim/euroc_c2_plugin/ros/ros_interface.cpp:341 on_set_stop_conditions() condition 7, invalid joint gripper
How, then should I go about setting gripper stop conditions for both the "the force exerted by the weight of the object pulling the TCP towards the floor" and "the force exerted by the gripper to hold the object in place" (According to your previous answer, "tool_force_threshold" and "joint_ext_torque_threshold", respectively)?
This was actually a bug in the simulator. We have already uploaded Version 1.0.8 which fixes this issue.