diff --git a/rbs_bringup/launch/rbs_robot.launch.py b/rbs_bringup/launch/rbs_robot.launch.py index c8a4668..79d6ae1 100644 --- a/rbs_bringup/launch/rbs_robot.launch.py +++ b/rbs_bringup/launch/rbs_robot.launch.py @@ -15,7 +15,6 @@ import xacro import os from ament_index_python.packages import get_package_share_directory -from rbs_arm import RbsBuilder def launch_setup(context, *args, **kwargs): # Initialize Arguments @@ -53,7 +52,7 @@ def launch_setup(context, *args, **kwargs): controllers_file = controllers_file.perform(context) # remappings = [("/tf", "tf"), ("/tf_static", "tf_static")] - + xacro_file = os.path.join(get_package_share_directory(description_package), "urdf", description_file) robot_description_doc = xacro.process_file( xacro_file, @@ -72,15 +71,10 @@ def launch_setup(context, *args, **kwargs): } ) - # robot = RbsBuilder(6, "arm0", "world", "rbs_gripper") - # robot.base() - # robot.gripper() - # robot.ros2_control() - # robot.moveit() robot_description_content = robot_description_doc.toprettyxml(indent=" ") robot_description = {"robot_description": robot_description_content} - + robot_description_semantic_content = Command( [ PathJoinSubstitution([FindExecutable(name="xacro")]), @@ -94,7 +88,7 @@ def launch_setup(context, *args, **kwargs): "gripper_name:=", gripper_name, " ", ] ) - + robot_description_semantic = {"robot_description_semantic": robot_description_semantic_content} robot_description_kinematics = PathJoinSubstitution( [FindPackageShare(moveit_config_package), "config", "kinematics.yaml"] @@ -145,7 +139,7 @@ def launch_setup(context, *args, **kwargs): 'namespace': namespace, }.items(), condition=IfCondition(launch_controllers)) - + moveit = IncludeLaunchDescription( PythonLaunchDescriptionSource([ PathJoinSubstitution([ @@ -183,7 +177,7 @@ def launch_setup(context, *args, **kwargs): 'namespace': namespace }.items() ) - + task_planner = IncludeLaunchDescription( PythonLaunchDescriptionSource([ PathJoinSubstitution([ @@ -196,7 +190,7 @@ def launch_setup(context, *args, **kwargs): # TBD }.items(), condition=IfCondition(launch_task_planner)) - + perception = IncludeLaunchDescription( PythonLaunchDescriptionSource([ PathJoinSubstitution([ @@ -310,101 +304,101 @@ def generate_launch_description(): ) ) declared_arguments.append( - DeclareLaunchArgument("with_gripper", - default_value="true", + DeclareLaunchArgument("with_gripper", + default_value="true", description="With gripper or not?") ) declared_arguments.append( - DeclareLaunchArgument("launch_rviz", - default_value="true", + DeclareLaunchArgument("launch_rviz", + default_value="true", description="Launch RViz?") ) declared_arguments.append( - DeclareLaunchArgument("sim_gazebo", - default_value="true", + DeclareLaunchArgument("sim_gazebo", + default_value="true", description="Gazebo Simulation") ) declared_arguments.append( - DeclareLaunchArgument("env_manager", - default_value="true", + DeclareLaunchArgument("env_manager", + default_value="true", description="Launch env_manager?") ) declared_arguments.append( - DeclareLaunchArgument("launch_sim", - default_value="true", + DeclareLaunchArgument("launch_sim", + default_value="true", description="Launch simulator (Gazebo)?\ Most general arg") ) declared_arguments.append( - DeclareLaunchArgument("launch_moveit", - default_value="true", + DeclareLaunchArgument("launch_moveit", + default_value="true", description="Launch moveit?") ) declared_arguments.append( - DeclareLaunchArgument("launch_perception", - default_value="false", + DeclareLaunchArgument("launch_perception", + default_value="false", description="Launch perception?") ) declared_arguments.append( - DeclareLaunchArgument("launch_task_planner", - default_value="false", + DeclareLaunchArgument("launch_task_planner", + default_value="false", description="Launch task_planner?") ) declared_arguments.append( - DeclareLaunchArgument("cartesian_controllers", - default_value="false", + DeclareLaunchArgument("cartesian_controllers", + default_value="false", description="Load cartesian\ controllers?") ) declared_arguments.append( - DeclareLaunchArgument("hardware", + DeclareLaunchArgument("hardware", choices=["gazebo", "mock"], - default_value="gazebo", + default_value="gazebo", description="Choose your harware_interface") ) declared_arguments.append( - DeclareLaunchArgument("launch_controllers", - default_value="true", + DeclareLaunchArgument("launch_controllers", + default_value="true", description="Launch controllers?") ) declared_arguments.append( - DeclareLaunchArgument("gazebo_gui", - default_value="false", + DeclareLaunchArgument("gazebo_gui", + default_value="false", description="Launch gazebo with gui?") ) declared_arguments.append( - DeclareLaunchArgument("namespace", - default_value="", + DeclareLaunchArgument("namespace", + default_value="", description="The ROS2 namespace of a robot") ) declared_arguments.append( - DeclareLaunchArgument("x", - default_value="0.0", + DeclareLaunchArgument("x", + default_value="0.0", description="Position of robot in world by X") ) declared_arguments.append( - DeclareLaunchArgument("y", - default_value="0.0", + DeclareLaunchArgument("y", + default_value="0.0", description="Position of robot in world by Y") ) declared_arguments.append( - DeclareLaunchArgument("z", - default_value="0.0", + DeclareLaunchArgument("z", + default_value="0.0", description="Position of robot in world by Z") ) declared_arguments.append( - DeclareLaunchArgument("roll", - default_value="0.0", + DeclareLaunchArgument("roll", + default_value="0.0", description="Position of robot in world by Z") ) declared_arguments.append( - DeclareLaunchArgument("pitch", - default_value="0.0", + DeclareLaunchArgument("pitch", + default_value="0.0", description="Position of robot in world by Z") ) declared_arguments.append( - DeclareLaunchArgument("yaw", - default_value="0.0", + DeclareLaunchArgument("yaw", + default_value="0.0", description="Position of robot in world by Z") )