fix: delete old env_manager launch in rbs_bringup and rbs_simulation
This commit is contained in:
parent
ec604bccb8
commit
a8480b290a
5 changed files with 3 additions and 64 deletions
|
@ -386,11 +386,6 @@ def generate_launch_description():
|
||||||
"sim_gazebo", default_value="true", description="Gazebo Simulation"
|
"sim_gazebo", default_value="true", description="Gazebo Simulation"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
declared_arguments.append(
|
|
||||||
DeclareLaunchArgument(
|
|
||||||
"env_manager", default_value="true", description="Launch env_manager?"
|
|
||||||
)
|
|
||||||
)
|
|
||||||
declared_arguments.append(
|
declared_arguments.append(
|
||||||
DeclareLaunchArgument(
|
DeclareLaunchArgument(
|
||||||
"launch_sim",
|
"launch_sim",
|
||||||
|
|
|
@ -1,32 +0,0 @@
|
||||||
import os
|
|
||||||
import xacro
|
|
||||||
import launch
|
|
||||||
import launch_ros.actions
|
|
||||||
from ament_index_python.packages import get_package_share_directory
|
|
||||||
|
|
||||||
|
|
||||||
def generate_launch_description():
|
|
||||||
|
|
||||||
initial_joint_controllers_file_path = os.path.join(
|
|
||||||
get_package_share_directory('ur_moveit_config'), 'config', 'ur_controllers.yaml'
|
|
||||||
)
|
|
||||||
|
|
||||||
doc = xacro.process_file(os.path.join(get_package_share_directory("ur_description"), 'urdf', 'ur.urdf.xacro'), mappings={
|
|
||||||
"safety_limits": "true",
|
|
||||||
"safety_pos_margin": "0.15",
|
|
||||||
"safety_k_position": "20",
|
|
||||||
"name": "ur",
|
|
||||||
"ur_type": "ur5e",
|
|
||||||
"tf_prefix": "",
|
|
||||||
"sim_mujoco": "true",
|
|
||||||
"simulation_controllers": str(initial_joint_controllers_file_path),
|
|
||||||
"with_gripper": "true"
|
|
||||||
})
|
|
||||||
|
|
||||||
robot_desc = doc.toprettyxml(indent=' ')
|
|
||||||
part1, part2 = robot_desc.split('?>')
|
|
||||||
m_encoding = 'UTF-8'
|
|
||||||
with open("current.urdf", 'w') as xfile:
|
|
||||||
xfile.write(part1 + 'encoding=\"{}\"?>\n'.format(m_encoding) + part2)
|
|
||||||
xfile.close()
|
|
||||||
return launch.LaunchDescription()
|
|
|
@ -22,15 +22,10 @@ def generate_launch_description():
|
||||||
choices=["rbs_arm" ,"ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e"],
|
choices=["rbs_arm" ,"ur3", "ur3e", "ur5", "ur5e", "ur10", "ur10e", "ur16e"],
|
||||||
default_value="rbs_arm",)
|
default_value="rbs_arm",)
|
||||||
)
|
)
|
||||||
declared_arguments.append(
|
|
||||||
DeclareLaunchArgument("env_manager",
|
|
||||||
default_value="false",
|
|
||||||
description="Launch env_manager?")
|
|
||||||
)
|
|
||||||
declared_arguments.append(
|
declared_arguments.append(
|
||||||
DeclareLaunchArgument("gazebo_gui",
|
DeclareLaunchArgument("gazebo_gui",
|
||||||
default_value="true",
|
default_value="true",
|
||||||
description="Launch env_manager?")
|
description="Launch gazebo_gui?")
|
||||||
)
|
)
|
||||||
declared_arguments.append(
|
declared_arguments.append(
|
||||||
DeclareLaunchArgument("debugger",
|
DeclareLaunchArgument("debugger",
|
||||||
|
@ -45,7 +40,6 @@ def generate_launch_description():
|
||||||
|
|
||||||
sim_gazebo = LaunchConfiguration("sim_gazebo")
|
sim_gazebo = LaunchConfiguration("sim_gazebo")
|
||||||
rbs_robot_type = LaunchConfiguration("rbs_robot_type")
|
rbs_robot_type = LaunchConfiguration("rbs_robot_type")
|
||||||
env_manager_cond = LaunchConfiguration("env_manager")
|
|
||||||
gazebo_gui = LaunchConfiguration("gazebo_gui")
|
gazebo_gui = LaunchConfiguration("gazebo_gui")
|
||||||
debugger = LaunchConfiguration("debugger")
|
debugger = LaunchConfiguration("debugger")
|
||||||
vision_bridge = LaunchConfiguration("vision_bridge")
|
vision_bridge = LaunchConfiguration("vision_bridge")
|
||||||
|
@ -89,9 +83,6 @@ def generate_launch_description():
|
||||||
'-topic', '/robot_description'],
|
'-topic', '/robot_description'],
|
||||||
output='screen',
|
output='screen',
|
||||||
condition=IfCondition(sim_gazebo))
|
condition=IfCondition(sim_gazebo))
|
||||||
env_manager = Node(package="env_manager",
|
|
||||||
executable="run_env_manager",
|
|
||||||
condition=IfCondition(env_manager_cond))
|
|
||||||
|
|
||||||
# Bridge
|
# Bridge
|
||||||
rgbd_bridge_out = Node(
|
rgbd_bridge_out = Node(
|
||||||
|
@ -129,7 +120,6 @@ def generate_launch_description():
|
||||||
gazebo,
|
gazebo,
|
||||||
gazebo_server,
|
gazebo_server,
|
||||||
gazebo_spawn_robot,
|
gazebo_spawn_robot,
|
||||||
env_manager,
|
|
||||||
rgbd_bridge_out,
|
rgbd_bridge_out,
|
||||||
rgbd_bridge_in,
|
rgbd_bridge_in,
|
||||||
clock_bridge,
|
clock_bridge,
|
||||||
|
|
|
@ -19,18 +19,13 @@ def generate_launch_description():
|
||||||
declared_arguments.append(
|
declared_arguments.append(
|
||||||
DeclareLaunchArgument("gazebo_gui",
|
DeclareLaunchArgument("gazebo_gui",
|
||||||
default_value="false",
|
default_value="false",
|
||||||
description="Launch env_manager?")
|
description="Launch gazebo_gui?")
|
||||||
)
|
)
|
||||||
declared_arguments.append(
|
declared_arguments.append(
|
||||||
DeclareLaunchArgument("debugger",
|
DeclareLaunchArgument("debugger",
|
||||||
default_value="false",
|
default_value="false",
|
||||||
description="launch Gazebo with debugger?")
|
description="launch Gazebo with debugger?")
|
||||||
)
|
)
|
||||||
declared_arguments.append(
|
|
||||||
DeclareLaunchArgument("launch_env_manager",
|
|
||||||
default_value="true",
|
|
||||||
description="Launch env_manager?")
|
|
||||||
)
|
|
||||||
declared_arguments.append(
|
declared_arguments.append(
|
||||||
DeclareLaunchArgument("rgbd_camera",
|
DeclareLaunchArgument("rgbd_camera",
|
||||||
default_value="true",
|
default_value="true",
|
||||||
|
@ -41,7 +36,6 @@ def generate_launch_description():
|
||||||
gazebo_gui = LaunchConfiguration("gazebo_gui")
|
gazebo_gui = LaunchConfiguration("gazebo_gui")
|
||||||
debugger = LaunchConfiguration("debugger")
|
debugger = LaunchConfiguration("debugger")
|
||||||
rgbd_camera = LaunchConfiguration("rgbd_camera")
|
rgbd_camera = LaunchConfiguration("rgbd_camera")
|
||||||
launch_env_manager = LaunchConfiguration("launch_env_manager")
|
|
||||||
gazebo_world_filename = LaunchConfiguration("gazebo_world_filename")
|
gazebo_world_filename = LaunchConfiguration("gazebo_world_filename")
|
||||||
|
|
||||||
world_config_file = PathJoinSubstitution(
|
world_config_file = PathJoinSubstitution(
|
||||||
|
@ -67,13 +61,6 @@ def generate_launch_description():
|
||||||
}.items(),
|
}.items(),
|
||||||
condition=IfCondition(gazebo_gui))
|
condition=IfCondition(gazebo_gui))
|
||||||
|
|
||||||
env_manager = Node(
|
|
||||||
package="env_manager",
|
|
||||||
executable="run_env_manager",
|
|
||||||
parameters=[{'use_sim_time': True}],
|
|
||||||
condition=IfCondition(launch_env_manager)
|
|
||||||
)
|
|
||||||
|
|
||||||
rgbd_sensor_bridge = Node(
|
rgbd_sensor_bridge = Node(
|
||||||
package="ros_gz_bridge",
|
package="ros_gz_bridge",
|
||||||
executable="parameter_bridge",
|
executable="parameter_bridge",
|
||||||
|
@ -102,6 +89,5 @@ def generate_launch_description():
|
||||||
gazebo_server,
|
gazebo_server,
|
||||||
clock_bridge,
|
clock_bridge,
|
||||||
rgbd_sensor_bridge,
|
rgbd_sensor_bridge,
|
||||||
env_manager
|
|
||||||
]
|
]
|
||||||
return LaunchDescription(declared_arguments + nodes_to_start)
|
return LaunchDescription(declared_arguments + nodes_to_start)
|
||||||
|
|
|
@ -50,7 +50,7 @@ def generate_launch_description():
|
||||||
declared_arguments.append(
|
declared_arguments.append(
|
||||||
DeclareLaunchArgument("gazebo_gui",
|
DeclareLaunchArgument("gazebo_gui",
|
||||||
default_value="true",
|
default_value="true",
|
||||||
description="Launch env_manager?")
|
description="Launch gazebo_gui?")
|
||||||
)
|
)
|
||||||
declared_arguments.append(
|
declared_arguments.append(
|
||||||
DeclareLaunchArgument("namespace",
|
DeclareLaunchArgument("namespace",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue