From f14359c81ccae21ac8beaec3f98ef670518115d8 Mon Sep 17 00:00:00 2001 From: Bill Finger Date: Sun, 1 Dec 2024 00:54:06 +0300 Subject: [PATCH] add support for real robot mode in runtime launch - Added a new `real_robot` launch argument with default set to "false". - Updated `launch_setup` to handle `real_robot` configuration, allowing selective use of `rbs_robot_setup`. - Updated `requirements.txt` to replace a static library reference with a GitHub repository link for `rbs_assets_library`. --- env_manager/rbs_runtime/launch/runtime.launch.py | 16 ++++++++++++++++ repos/requirements.txt | 4 +++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/env_manager/rbs_runtime/launch/runtime.launch.py b/env_manager/rbs_runtime/launch/runtime.launch.py index 9656efa..d33accc 100644 --- a/env_manager/rbs_runtime/launch/runtime.launch.py +++ b/env_manager/rbs_runtime/launch/runtime.launch.py @@ -41,6 +41,8 @@ def launch_setup(context, *args, **kwargs): interactive = LaunchConfiguration("interactive").perform(context) + real_robot = LaunchConfiguration("real_robot").perform(context) + if not scene_config_file == "": config_file = {"config_file": scene_config_file} else: @@ -153,9 +155,15 @@ def launch_setup(context, *args, **kwargs): }.items(), ) + if real_robot == "true": + return [rbs_robot_setup] + rbs_runtime = Node( package="rbs_runtime", executable="runtime", + output='log', + emulate_tty=True, + # arguments=[('log_level:=debug')], parameters=[robot_description, config_file, {"use_sim_time": True}], ) @@ -307,6 +315,14 @@ def generate_launch_description(): description="Wheter to run the motion_control_handle controller", ), ) + declared_arguments.append( + DeclareLaunchArgument( + "real_robot", + default_value="false", + description="Wheter to run on the real robot", + ), + ) + return LaunchDescription( declared_arguments + [OpaqueFunction(function=launch_setup)] diff --git a/repos/requirements.txt b/repos/requirements.txt index d1174bf..6214589 100644 --- a/repos/requirements.txt +++ b/repos/requirements.txt @@ -26,4 +26,6 @@ wandb>=0.18.6 scenario @ https://devpi.narmak.xyz/narmak/dev/+f/63e/86b0583c22e52/scenario-1.4.0-cp310-cp310-linux_x86_64.whl#sha256=63e86b0583c22e52c299b9a25e74a26178fc7dbc423f661bf34e4dd26543d11f gym-gz @ https://devpi.narmak.xyz/narmak/dev/+f/539/1f448c1391486/gym_gz-1.4.0-py3-none-any.whl#sha256=5391f448c13914860e2a65904f6d0fac7eba71daaa3327d8399d7ae516471a68 gym-gz-models @ https://devpi.narmak.xyz/narmak/dev/+f/f42/4784934183e88/gym_gz_models-1.2.0-cp310-cp310-linux_x86_64.whl#sha256=f424784934183e88541c703c789315ba6118661bd221a4bf9135c6a0ee012e96 -rbs_asstss_library @ https://devpi.narmak.xyz/narmak/dev/+f/c8f/496c000e90a09/rbs_assets_library-0.1.0-py2.py3-none-any.whl#sha256=c8f496c000e90a09efc0731e7cd06a62a48d645d8a801c2f1bc5c3990c23ba6a + +# rbs_assets_library +git+https://github.com/solid-sinusoid/rbs_assets_library.git@master