Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,11 @@
[submodule "src/moveit_pro_sam2"]
path = src/moveit_pro_sam2
url = https://github.com/PickNikRobotics/moveit_pro_sam2.git
[submodule "src/external_dependencies/moveit_pro_experimental_behaviors"]
path = src/external_dependencies/moveit_pro_experimental_behaviors
url = git@github.com:PickNikRobotics/moveit_pro_experimental_behaviors.git
branch = feat/pose-vector-basis-snapshot-behaviors
[submodule "src/external_dependencies/ROS-TCP-Endpoint"]
path = src/external_dependencies/ROS-TCP-Endpoint
url = https://github.com/Unity-Technologies/ROS-TCP-Endpoint.git
branch = main-ros2
1 change: 1 addition & 0 deletions src/external_dependencies/ROS-TCP-Endpoint
Submodule ROS-TCP-Endpoint added at 54c1a6
10 changes: 10 additions & 0 deletions src/lab_sim/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ hardware:
- mujoco_model: "description/scene.xml"
- mujoco_viewer: false

# Override the inherited (empty) drivers-to-persist launch so the Meta Quest
# ros_tcp_endpoint node starts with the sim and persists across agent_bridge
# restarts. Without it, /right_controller_odom and the button-event topics
# never publish, and the "Quest Teleop" objective blocks forever.
simulated_robot_driver_persist_launch_file:
package: "lab_sim"
path: "launch/sim/robot_drivers_to_persist_sim.launch.py"

moveit_params:
joint_limits:
package: "lab_sim"
Expand Down Expand Up @@ -51,6 +59,8 @@ objectives:
- "moveit_pro::behaviors::MujocoBehaviorsLoader"
lab_sim:
- "lab_sim_behaviors::LabSimBehaviorsLoader"
experimental:
- "experimental_behaviors::ExperimentalBehaviorsLoader"
# Specify source folder for objectives
# [Required]
objective_library_paths:
Expand Down
49 changes: 49 additions & 0 deletions src/lab_sim/launch/sim/robot_drivers_to_persist_sim.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Persistent driver-side processes for lab_sim.
#
# Launched by MoveIt Pro via the simulated_robot_driver_persist_launch_file
# config field. Lives in the "drivers to persist" lifecycle so it survives
# agent_bridge restarts — that matters because the Meta Quest headset holds
# a TCP socket open against ros_tcp_endpoint, and tearing that down would
# force the user to reconnect from the headset.

from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description() -> LaunchDescription:
ros_tcp_endpoint_node = Node(
package="ros_tcp_endpoint",
executable="default_server_endpoint",
name="ros_tcp_endpoint",
emulate_tty=True,
parameters=[
{"ROS_IP": "192.168.1.34"},
],
output="screen",
)

# Debug-only static TF linking the disjoint quest TF root into the robot tree
# at the world frame. The numerical values are wrong — quest and world have
# no real geometric relationship — but the link satisfies the canTransform()
# check inside marker_utils::transformPoseToBaseFrame() so VisualizePose calls
# against quest-frame poses (controller markers in v11) can render.
#
# No control path uses this transform: the v11 kinematic math composes the
# controller delta in quest and applies it to the EE in world directly,
# bypassing TF entirely. The lie is contained to RViz markers.
#
# Before shipping v11, remove the quest-frame VisualizePose calls from the
# objective and delete this node — neither will be needed.
static_tf_world_to_quest = Node(
package="tf2_ros",
executable="static_transform_publisher",
name="static_transform_world_to_quest",
output="log",
arguments=[
"0", "0", "0", # x y z (identity translation; the link is geometrically meaningless)
"0", "0", "0", # yaw pitch roll
"world", "quest",
],
)

return LaunchDescription([ros_tcp_endpoint_node, static_tf_world_to_quest])
Loading
Loading