Closed jschleicher closed 1 year ago
I see several options and are open for discussion:
From a single-point-of-control, the recorded robot state from the last plan-and-execute-request should still be the current robot state of the robot (we have a position-controlled robot so there is no motion, if we don't control it). What do you think of simply removing this wait-line in our SequenceCapability?
In a previous discussion the argumentation was, if the start state is given inside the request, there is no need to wait (https://github.com/ros-planning/moveit/issues/868#issuecomment-393102371). That could be brought upstream as PR. Changes inside our python-API would query the current state after the previous command (maybe only moves the delay into another node and doesn't eliminate it).
Make the time configurable (upstream). Let the user choose an age inside his configuration, to wait for a current robot state at the time of request minus some offset.
waitForCurrentRobotState(ros::Time::now() - ros::Duration(0,100e6);
What do you think?
From a single-point-of-control, the recorded robot state from the last plan-and-execute-request should still be the current robot state of the robot (we have a position-controlled robot so there is no motion, if we don't control it). What do you think of simply removing this wait-line in our SequenceCapability?
Will this still work when we enable the speed controller?
We drop the wait
for now and issue a warning, if the state is too old. I'm preparing a PR.
@jschleicher ping
@agutenkunst There are more places which waitForCurrentState
, e.g. trajectory_execution_manager:1539, trajectory_execution_manager.cpp:940 and plan_execution.cpp:412 . I'd want to time and measure them altogether...
Commit
binary package
ii ros-melodic-pilz-industrial-motion 0.4.3-0bionic.20190601.035050 amd64
Steps to reproduce
roslaunch prbt_moveit_config moveit_planning_execution.launch sim:=True pipeline:=pilz_command_planner
Expected behavior
Planning starts immediately with latest robot state and takes less than 10 milliseconds to complete.
Observed behavior
https://github.com/PilzDE/pilz_industrial_motion/blob/4dadef42fc5051869fadbeacc8d168e04e9b2661/pilz_trajectory_generation/src/move_group_sequence_action.cpp#L92 Waiting for a recent robot state takes about 20 milliseconds (see log below), while the actual trajectory generation takes < 1 millisecond.
Logfiles
Reference to test
Performance tests are not implemented / no automatic test suite could detect this.