You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Enable JTC for hardware having offset from state measurements (ros-controls#189)
* Avoid "jumps" with states that have tracking error. All test are passing but separatelly. Is there some kind of timeout?
* Remove allow_integration_flag
* Add reading from command interfaces when restarting controller
* Rename variable according to review
* Use even more clear name
* Remove debug lines.
* Update documentation
* Apply suggestions from code review
Co-authored-by: Bence Magyar <[email protected]>
* Move methods to cpp file as per reviewers comment.
Co-authored-by: Bence Magyar <[email protected]>
Copy file name to clipboardExpand all lines: joint_trajectory_controller/doc/userdoc.rst
+87-13Lines changed: 87 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ joint_trajectory_controller
6
6
Controller for executing joint-space trajectories on a group of joints. Trajectories are specified as a set of waypoints to be reached at specific time instants, which the controller attempts to execute as well as the mechanism allows. Waypoints consist of positions, and optionally velocities and accelerations.
7
7
8
8
Trajectory representation
9
-
^^^^^^^^^^^^^^^^^^^^^^^^^
9
+
-------------------------
10
10
11
11
The controller is templated to work with multiple trajectory representations. By default, a spline interpolator is provided, but it's possible to support other representations. The spline interpolator uses the following interpolation strategies depending on the waypoint specification:
12
12
@@ -17,14 +17,14 @@ The controller is templated to work with multiple trajectory representations. By
17
17
Quintic: Position, velocity and acceleration are specified: Guarantees continuity at the acceleration level.
18
18
19
19
Hardware interface type
20
-
^^^^^^^^^^^^^^^^^^^^^^^
20
+
-----------------------
21
21
22
22
The controller is templated to work with multiple hardware interface types. Currently joints with position, velocity and effort interfaces are supported. For position-controlled joints, desired positions are simply forwarded to the joints; while for velocity (effort) joints, the position+velocity trajectory following error is mapped to velocity (effort) commands through a PID loop. Example controller configurations can be found here.
23
23
24
24
Similarly to the trajectory representation case above, it's possible to support new hardware interfaces, or alternative mappings to an already supported interface (eg. a proxy controller for generating effort commands).
25
25
26
26
Other features
27
-
^^^^^^^^^^^^^^
27
+
--------------
28
28
29
29
Realtime-safe implementation.
30
30
@@ -34,7 +34,7 @@ Other features
34
34
35
35
36
36
Using Joint Trajectory Controller(s)
37
-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
37
+
------------------------------------
38
38
39
39
The controller expects at least position feedback from the hardware.
40
40
Joint velocities and accelerations are optional.
@@ -54,12 +54,12 @@ A yaml file for using it could be:
54
54
joint_trajectory_controller:
55
55
ros__parameters:
56
56
joints:
57
-
- joint0
58
57
- joint1
59
58
- joint2
60
59
- joint3
61
60
- joint4
62
61
- joint5
62
+
- joint6
63
63
64
64
command_interfaces:
65
65
- position
@@ -68,19 +68,93 @@ A yaml file for using it could be:
68
68
- position
69
69
- velocity
70
70
71
-
state_publish_rate: 50.0# Defaults to 50
72
-
action_monitor_rate: 20.0# Defaults to 20
71
+
state_publish_rate: 50.0
72
+
action_monitor_rate: 20.0
73
73
74
-
allow_partial_joints_goal: false # Defaults to false
75
-
hardware_state_has_offset: true
76
-
deduce_states_from_derivatives: true
74
+
allow_partial_joints_goal: false
75
+
open_loop_control: true
77
76
constraints:
78
-
stopped_velocity_tolerance: 0.01# Defaults to 0.01
79
-
goal_time: 0.0# Defaults to 0.0 (start immediately)
77
+
stopped_velocity_tolerance: 0.01
78
+
goal_time: 0.0
79
+
joint1:
80
+
trajectory: 0.05
81
+
goal: 0.03
82
+
83
+
84
+
Details about parameters
85
+
^^^^^^^^^^^^^^^^^^^^^^^^
86
+
87
+
joint (list(string)):
88
+
Joint names to control.
89
+
90
+
command_interface (list(string)):
91
+
Command interfaces provided by the hardware interface for all joints.
State interfaces provided by the hardware for all joints.
97
+
98
+
Values: position (mandatory) [velocity, [acceleration]].
99
+
Acceleration interface can only be used in combination with position and velocity.
100
+
101
+
Default: 50.0
102
+
103
+
state_publish_rate (double):
104
+
Publish-rate of the controller's "state" topic.
105
+
106
+
Default: 20.0
107
+
108
+
action_monitor_rate (double):
109
+
Rate to monitor status changes when the controller is executing action (control_msgs::action::FollowJointTrajectory).
110
+
111
+
allow_partial_joints_goal (boolean):
112
+
Allow joint goals defining trajectory for only some joints.
113
+
114
+
open_loop_control (boolean):
115
+
Use controller in open-loop control mode using ignoring the states provided by hardware interface and using last commands as states in the next control step. This is useful if hardware states are not following commands, i.e., an offset between those (typical for hydraulic manipulators).
116
+
117
+
If this flag is set, the controller tries to read the values from the command interfaces on starting. If they have real numeric values, those will be used instead of state interfaces. Therefore it is important set command interfaces to NaN (std::numeric_limits<double>::quiet_NaN()) or state values when the hardware is started.
118
+
119
+
constraints (structure)
120
+
Default values for tolerances if no explicit values are states in JointTrajectory message.
121
+
122
+
constraints.stopped_velocity_tolerance (double)
123
+
Default value for end velocity deviation.
124
+
125
+
Default: 0.01
126
+
127
+
constraints.goal_time (double)
128
+
Maximally allowed tolerance for not reaching the end of the trajectory in a predefined time.
129
+
130
+
Default: 0.0 (not checked)
131
+
132
+
constraints.<joint_name>.trajectory
133
+
Maximally allowed deviation from the target trajectory for a given joint.
134
+
135
+
Default: 0.0 (tolerance is not enforced)
136
+
137
+
constraints.<joint_name>.goal
138
+
Maximally allowed deviation from the goal (end of the trajectory) for a given joint.
The controller types are placed into namespaces according to their command types for the hardware (see `general introduction into controllers <../../index.rst>`_).
0 commit comments