-
Notifications
You must be signed in to change notification settings - Fork 525
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TrajectoryController: Use desired state to calculate hold trajectory (#…
…297) * Use desired state to calculate hold trajectory * add test case that fails without e53b364 See pull request for fix/jerk_on_stop for detailed description. This commit adds a delay subscriber to rrbot to emulate a hardware controller with dead time. The jump backwards in the actual position is observed in joint_trajectory_controller_test by extending the stateCB. The new testCase fails, if the velocity of the actual position is negative although motion should only be forwards. * add test case with upper bound (simulating a wall) Adding a topic to rrbot to set an upper bound allows to test the actual position after setHoldPosition() has been called. * preserve jump, if stop_trajectory_duration==0 old behaviour for stop_trajectory_duration==0 * incorporate review comments * use start_time variable in setHoldPosition * doxygen documentation in header file * drop sleep() in testcases in favor of waiting for PREEMPTED/SUCCEEDED state to speedup the tests a bit and stay below the former timeout of 85s
- Loading branch information
1 parent
3c82ca7
commit b10c2b7
Showing
8 changed files
with
333 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
joint_trajectory_controller/test/joint_trajectory_controller_stopramp.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<launch> | ||
<arg name="display_plots" default="false"/> | ||
|
||
<!-- Load RRbot model --> | ||
<param name="robot_description" | ||
command="$(find xacro)/xacro '$(find joint_trajectory_controller)/test/rrbot.xacro'" /> | ||
|
||
<!-- Start RRbot --> | ||
<node name="rrbot" | ||
pkg="joint_trajectory_controller" | ||
type="rrbot"/> | ||
|
||
<!-- Load controller config --> | ||
<rosparam command="load" file="$(find joint_trajectory_controller)/test/rrbot_controllers_stopramp.yaml" /> | ||
|
||
<!-- Spawn controller --> | ||
<node name="controller_spawner" | ||
pkg="controller_manager" type="spawner" output="screen" | ||
args="rrbot_controller" /> | ||
|
||
<group if="$(arg display_plots)"> | ||
<!-- rqt_plot monitoring --> | ||
<node name="rrbot_pos_monitor" | ||
pkg="rqt_plot" | ||
type="rqt_plot" | ||
args="/rrbot_controller/state/desired/positions[0]:positions[1],/rrbot_controller/state/actual/positions[0]:positions[1]" /> | ||
|
||
<node name="rrbot_vel_monitor" | ||
pkg="rqt_plot" | ||
type="rqt_plot" | ||
args="/rrbot_controller/state/desired/velocities[0]:velocities[1],/rrbot_controller/state/actual/velocities[0]:velocities[1]" /> | ||
</group> | ||
|
||
<!-- Controller test --> | ||
<test test-name="joint_trajectory_controller_stopramp_test" | ||
pkg="joint_trajectory_controller" | ||
type="joint_trajectory_controller_stopramp_test" | ||
time-limit="85.0"/> | ||
</launch> |
Oops, something went wrong.