Skip to content

Commit 588aa30

Browse files
mergify[bot]URJalaurfeex
authored
Disable pose broadcaster on mock hardware (backport of #1229) (#1230)
As mock hardware doesn't send the same pose information as the real robot does, it does make sense to not start it in mock hardware. Co-authored-by: URJala <[email protected]> Co-authored-by: Felix Exner <[email protected]>
1 parent 9b6103a commit 588aa30

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

ur_robot_driver/launch/ur_control.launch.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,12 @@ def controller_spawner(controllers, active=True):
355355
controllers_active.append(initial_joint_controller.perform(context))
356356
controllers_inactive.remove(initial_joint_controller.perform(context))
357357

358-
controller_spawners = [controller_spawner(controllers_active)] + [
359-
controller_spawner(controllers_inactive, active=False)
358+
if use_fake_hardware.perform(context) == "true":
359+
controllers_active.remove("tcp_pose_broadcaster")
360+
361+
controller_spawners = [
362+
controller_spawner(controllers_active),
363+
controller_spawner(controllers_inactive, active=False),
360364
]
361365

362366
nodes_to_start = [

0 commit comments

Comments
 (0)