Skip to content

Commit 4b79c59

Browse files
committed
add joint_jog to all configs
1 parent 4ec0f06 commit 4b79c59

File tree

34 files changed

+648
-4
lines changed

34 files changed

+648
-4
lines changed

src/factory_sim/config/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@ moveit_params:
8080
pose_jog:
8181
package: "factory_sim"
8282
path: "config/moveit/pose_jog.yaml"
83+
joint_jog:
84+
package: "factory_sim"
85+
path: "config/moveit/joint_jog.yaml"
8386
publish:
8487
planning_scene: True
8588
geometry_updates: True
@@ -112,6 +115,7 @@ ros2_control:
112115
controllers_inactive_at_startup:
113116
- "servo_controller"
114117
- "velocity_force_controller"
118+
- "joint_velocity_controller"
115119
# Any controllers here will not be spawned by MoveIt Pro.
116120
# [Optional, default=[]]
117121
controllers_not_managed: []

src/factory_sim/config/control/picknik_fanuc.ros2_control.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ controller_manager:
1919
type: position_controllers/GripperActionController
2020
velocity_force_controller:
2121
type: velocity_force_controller/VelocityForceController
22+
joint_velocity_controller:
23+
type: joint_velocity_controller/JointVelocityController
2224

2325
tool_attach_controller:
2426
ros__parameters:
@@ -152,3 +154,31 @@ velocity_force_controller:
152154
command_timeout: 0.2
153155
# Padding (in radians) to add to joint position limits as a safety margin.
154156
joint_limit_position_tolerance: 0.02
157+
158+
joint_velocity_controller:
159+
ros__parameters:
160+
# Joint group to control.
161+
planning_group_name: manipulator
162+
# Maximum joint-space velocities.
163+
max_joint_velocity:
164+
- 1.0
165+
- 1.0
166+
- 1.0
167+
- 1.0
168+
- 1.0
169+
- 1.0
170+
# Maximum joint-space accelerations.
171+
max_joint_acceleration:
172+
- 2.0
173+
- 2.0
174+
- 2.0
175+
- 2.0
176+
- 2.0
177+
- 2.0
178+
command_interfaces: ["position"]
179+
# Padding (in radians) to add to joint position limits as a safety margin.
180+
joint_limit_position_tolerance: 0.02
181+
# Timeout in seconds after which the controller will stop motion if no new commands are received.
182+
command_timeout: 0.2
183+
# Rate in Hz at which the controller will publish the state.
184+
state_publish_rate: 20
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# Planning groups to use in JointJog, and their corresponding JVC controllers.
3+
# The number of elements in `planning_groups` and `controllers` must match.
4+
planning_groups: ['manipulator']
5+
controllers: ['joint_velocity_controller']

src/grinding_sim/config/config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,9 @@ moveit_params:
7979
pose_jog:
8080
package: "grinding_sim"
8181
path: "config/moveit/pose_jog.yaml"
82+
joint_jog:
83+
package: "grinding_sim"
84+
path: "config/moveit/joint_jog.yaml"
8285

8386
publish:
8487
planning_scene: True
@@ -110,6 +113,7 @@ ros2_control:
110113
controllers_inactive_at_startup:
111114
- "servo_controller"
112115
- "velocity_force_controller"
116+
- "joint_velocity_controller"
113117

114118
# Configuration for loading behaviors and objectives.
115119
# [Required]

src/grinding_sim/config/control/ur20.ros2_control.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ controller_manager:
99
type: joint_trajectory_controller/JointTrajectoryController
1010
velocity_force_controller:
1111
type: velocity_force_controller/VelocityForceController
12+
joint_velocity_controller:
13+
type: joint_velocity_controller/JointVelocityController
1214

1315

1416
joint_state_broadcaster:
@@ -168,3 +170,31 @@ velocity_force_controller:
168170
command_timeout: 0.2
169171
# Padding (in radians) to add to joint position limits as a safety margin.
170172
joint_limit_position_tolerance: 0.02
173+
174+
joint_velocity_controller:
175+
ros__parameters:
176+
# Joint group to control.
177+
planning_group_name: manipulator
178+
# Maximum joint-space velocities.
179+
max_joint_velocity:
180+
- 1.0
181+
- 1.0
182+
- 1.0
183+
- 1.0
184+
- 1.0
185+
- 1.0
186+
# Maximum joint-space accelerations.
187+
max_joint_acceleration:
188+
- 2.0
189+
- 2.0
190+
- 2.0
191+
- 2.0
192+
- 2.0
193+
- 2.0
194+
command_interfaces: ["position"]
195+
# Padding (in radians) to add to joint position limits as a safety margin.
196+
joint_limit_position_tolerance: 0.02
197+
# Timeout in seconds after which the controller will stop motion if no new commands are received.
198+
command_timeout: 0.2
199+
# Rate in Hz at which the controller will publish the state.
200+
state_publish_rate: 20
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# Planning groups to use in JointJog, and their corresponding JVC controllers.
3+
# The number of elements in `planning_groups` and `controllers` must match.
4+
planning_groups: ['manipulator']
5+
controllers: ['joint_velocity_controller']

src/hangar_sim/config/config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ moveit_params:
5050
pose_jog:
5151
package: "hangar_sim"
5252
path: "config/moveit/pose_jog.yaml"
53+
joint_jog:
54+
package: "hangar_sim"
55+
path: "config/moveit/joint_jog.yaml"
5356

5457

5558
# Configuration for loading behaviors and objectives.
@@ -103,3 +106,5 @@ ros2_control:
103106
- "platform_velocity_controller_nav2"
104107
- "velocity_force_controller"
105108
- "arm_only_velocity_force_controller"
109+
- "joint_velocity_controller"
110+
- "arm_only_joint_velocity_controller"

src/hangar_sim/config/control/picknik_ur.ros2_control.yaml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ controller_manager:
1919
type: velocity_force_controller/VelocityForceController
2020
arm_only_velocity_force_controller:
2121
type: velocity_force_controller/VelocityForceController
22+
joint_velocity_controller:
23+
type: joint_velocity_controller/JointVelocityController
24+
arm_only_joint_velocity_controller:
25+
type: joint_velocity_controller/JointVelocityController
2226

2327
vacuum_gripper:
2428
ros__parameters:
@@ -487,3 +491,82 @@ arm_only_velocity_force_controller:
487491
command_timeout: 0.2
488492
# Padding (in radians) to add to joint position limits as a safety margin.
489493
joint_limit_position_tolerance: 0.02
494+
495+
joint_velocity_controller:
496+
ros__parameters:
497+
# Joint group to control.
498+
planning_group_name: manipulator
499+
command_joints:
500+
- platform_velocity_controller/linear_x_joint
501+
- platform_velocity_controller/linear_y_joint
502+
- platform_velocity_controller/rotational_yaw_joint
503+
- shoulder_pan_joint
504+
- shoulder_lift_joint
505+
- elbow_joint
506+
- wrist_1_joint
507+
- wrist_2_joint
508+
- wrist_3_joint
509+
# Maximum joint-space velocities.
510+
max_joint_velocity:
511+
- 1.0
512+
- 1.0
513+
- 1.0
514+
- 1.0
515+
- 1.0
516+
- 1.0
517+
- 1.0
518+
- 1.0
519+
- 1.0
520+
# Maximum joint-space accelerations.
521+
max_joint_acceleration:
522+
- 2.0
523+
- 2.0
524+
- 2.0
525+
- 2.0
526+
- 2.0
527+
- 2.0
528+
- 2.0
529+
- 2.0
530+
- 2.0
531+
command_interfaces: ["velocity"]
532+
# Padding (in radians) to add to joint position limits as a safety margin.
533+
joint_limit_position_tolerance: 0.02
534+
# Timeout in seconds after which the controller will stop motion if no new commands are received.
535+
command_timeout: 0.2
536+
# Rate in Hz at which the controller will publish the state.
537+
state_publish_rate: 20
538+
539+
arm_only_joint_velocity_controller:
540+
ros__parameters:
541+
# Joint group to control.
542+
planning_group_name: arm_only
543+
command_joints:
544+
- shoulder_pan_joint
545+
- shoulder_lift_joint
546+
- elbow_joint
547+
- wrist_1_joint
548+
- wrist_2_joint
549+
- wrist_3_joint
550+
# Maximum joint-space velocities.
551+
max_joint_velocity:
552+
- 1.0
553+
- 1.0
554+
- 1.0
555+
- 1.0
556+
- 1.0
557+
- 1.0
558+
# Maximum joint-space accelerations.
559+
max_joint_acceleration:
560+
- 2.0
561+
- 2.0
562+
- 2.0
563+
- 2.0
564+
- 2.0
565+
- 2.0
566+
command_interfaces: ["velocity"]
567+
# Padding (in radians) to add to joint position limits as a safety margin.
568+
joint_limit_position_tolerance: 0.02
569+
# Timeout in seconds after which the controller will stop motion if no new commands are received.
570+
command_timeout: 0.2
571+
# Rate in Hz at which the controller will publish the state.
572+
state_publish_rate: 20
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
# Planning groups to use in JointJog, and their corresponding JVC controllers.
3+
# The number of elements in `planning_groups` and `controllers` must match.
4+
planning_groups: ['manipulator', 'arm_only']
5+
controllers: ['joint_velocity_controller', 'arm_only_joint_velocity_controller']

src/hangar_sim/objectives/request_teleoperation.xml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
current_teleop_mode="{teleop_mode}"
1919
planning_groups="{planning_groups}"
2020
controllers="{controllers}"
21+
skip_collision_checks="{skip_collision_checks}"
2122
tip_links="{tip_links}"
2223
/>
2324
<Decorator ID="KeepRunningUntilFailure">
@@ -185,10 +186,42 @@
185186
</Decorator>
186187
</Control>
187188
<Control ID="Sequence" _while="teleop_mode == 1">
188-
<Action
189-
ID="TeleoperateJointJog"
190-
controller_name="servo_controller"
191-
/>
189+
<Decorator ID="Repeat" num_cycles="-1">
190+
<Control ID="Sequence">
191+
<Action
192+
ID="SwitchController"
193+
activate_controllers="{controllers}"
194+
deactivate_controllers="platform_velocity_controller_nav2"
195+
/>
196+
197+
<Decorator ID="ForceSuccess">
198+
<Decorator ID="Repeat" num_cycles="-1">
199+
<Control
200+
ID="Parallel"
201+
success_count="1"
202+
failure_count="1"
203+
>
204+
<Decorator ID="KeepRunningUntilFailure">
205+
<Action
206+
ID="GetElementOfVector"
207+
vector_in="{controllers}"
208+
index="0"
209+
element="{first_controller}"
210+
/>
211+
</Decorator>
212+
213+
<Action
214+
ID="JointJog"
215+
controller_name="{first_controller}"
216+
link_padding="0.00000"
217+
stop_safety_factor="1.500000"
218+
skip_collision_checks="{skip_collision_checks}"
219+
/>
220+
</Control>
221+
</Decorator>
222+
</Decorator>
223+
</Control>
224+
</Decorator>
192225
</Control>
193226
</Control>
194227
</Decorator>

0 commit comments

Comments
 (0)