From e0e44b1ffaeb3577a7583d5dea0dd293c3057325 Mon Sep 17 00:00:00 2001 From: Bastian Hofmann Date: Tue, 24 Jan 2023 15:19:00 +0000 Subject: [PATCH] Added "support" for controller plugin, currently segfaults. --- build.sh | 4 +- src/gaz_simulation/launch/moveit_launch.py | 147 +++++------ src/gz_ros2_control | 1 + src/ign_actor_plugin/action/Animation.action | 6 - src/ign_actor_plugin/action/Movement.action | 8 - src/ign_world/CMakeLists.txt | 28 +++ src/ign_world/launch/moveit_launch.py | 238 ++++++++++++++++++ src/ign_world/package.xml | 28 +++ .../world/gaz_new_test.sdf | 20 +- src/iisy_config/launch/debug.launch.py | 22 +- src/iisy_config/launch/lbr_control.launch.py | 17 +- .../launch/lbr_simulation.launch.py | 21 +- src/iisy_config/urdf/iisy.urdf | 11 +- 13 files changed, 409 insertions(+), 142 deletions(-) create mode 160000 src/gz_ros2_control delete mode 100644 src/ign_actor_plugin/action/Animation.action delete mode 100644 src/ign_actor_plugin/action/Movement.action create mode 100644 src/ign_world/CMakeLists.txt create mode 100644 src/ign_world/launch/moveit_launch.py create mode 100644 src/ign_world/package.xml rename src/{gaz_simulation => ign_world}/world/gaz_new_test.sdf (82%) diff --git a/build.sh b/build.sh index a669b9f..748846a 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,4 @@ #!/bin/bash -pushd "$(dirname "$0")" +pushd "$(dirname "$0")" || exit colcon build --event-handlers console_cohesion+ --cmake-args -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja -popd +popd || exit diff --git a/src/gaz_simulation/launch/moveit_launch.py b/src/gaz_simulation/launch/moveit_launch.py index cf9d657..aa59279 100644 --- a/src/gaz_simulation/launch/moveit_launch.py +++ b/src/gaz_simulation/launch/moveit_launch.py @@ -8,55 +8,59 @@ from launch.substitutions import Command, LaunchConfiguration from launch.launch_description_sources import PythonLaunchDescriptionSource from ament_index_python.packages import get_package_share_directory + def load_file(package_name, file_path): package_path = get_package_share_directory(package_name) absolute_file_path = os.path.join(package_path, file_path) try: with open(absolute_file_path, 'r') as file: + print("Opened file") return file.read() - except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available - print("ERROR: load_file "+package_name+"|"+file_path) + except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available + print("ERROR: load_file " + package_name + " | " + file_path + " -> " + absolute_file_path) return None + def load_yaml(package_name, file_path): package_path = get_package_share_directory(package_name) absolute_file_path = os.path.join(package_path, file_path) try: with open(absolute_file_path, 'r') as file: + print("Opened file") return yaml.safe_load(file) - except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available - print("ERROR: load_file "+package_name+"|"+file_path) + except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available + print("ERROR: load_yaml " + package_name + " | " + file_path + " -> " + absolute_file_path) + return None + def generate_launch_description(): robot_name = "iisy" - package_name = "gaz_simulation" - pkg_gazebo_ros = FindPackageShare(package='gazebo_ros').find('gazebo_ros') - path = FindPackageShare(package=package_name).find(package_name) - world_path = os.path.join(path, "world/test2.xml") - urdf_path = os.path.join(path, "urdf/iisy.urdf") + # pkg_gazebo_ros = FindPackageShare(package='gazebo_ros').find('gazebo_ros') + world_path = os.path.join(FindPackageShare(package="gaz_simulation").find("gaz_simulation"), "world/test2.xml") + urdf_path = os.path.join(FindPackageShare(package="iisy_config").find("iisy_config"), "urdf/iisy.urdf") - robot_description_config = load_file('gaz_simulation', 'urdf/iisy.urdf') - robot_description = {'robot_description' : robot_description_config} + robot_description_config = load_file('iisy_config', 'urdf/iisy.urdf') + robot_description = {'robot_description': robot_description_config} - robot_description_semantic_config = load_file('iisy_config', 'config/iisy.srdf') - robot_description_semantic = {'robot_description_semantic' : robot_description_semantic_config} + robot_description_semantic_config = load_file('iisy_config', 'srdf/iisy.srdf') + robot_description_semantic = {'robot_description_semantic': robot_description_semantic_config} - kinematics_yaml = load_yaml('iisy_config', 'config/kinematics.yaml') - robot_description_kinematics = { 'robot_description_kinematics' : kinematics_yaml } + kinematics_yaml = load_yaml('iisy_config', 'config/kinematics.yml') + robot_description_kinematics = {'robot_description_kinematics': kinematics_yaml} - ompl_planning_pipeline_config = { 'move_group' : { - 'planning_plugin' : 'ompl_interface/OMPLPlanner', - 'request_adapters' : """default_planner_request_adapters/AddTimeOptimalParameterization default_planner_request_adapters/FixWorkspaceBounds default_planner_request_adapters/FixStartStateBounds default_planner_request_adapters/FixStartStateCollision default_planner_request_adapters/FixStartStatePathConstraints""" , - 'start_state_max_bounds_error' : 0.1 } } - ompl_planning_yaml = load_yaml('iisy_config', 'config/ompl_planning.yaml') + ompl_planning_pipeline_config = {'move_group': { + 'planning_plugin': 'ompl_interface/OMPLPlanner', + 'request_adapters': """default_planner_request_adapters/AddTimeOptimalParameterization default_planner_request_adapters/FixWorkspaceBounds default_planner_request_adapters/FixStartStateBounds default_planner_request_adapters/FixStartStateCollision default_planner_request_adapters/FixStartStatePathConstraints""", + 'start_state_max_bounds_error': 0.1}} + ompl_planning_yaml = load_yaml('iisy_config', 'config/ompl_planning.yml') ompl_planning_pipeline_config['move_group'].update(ompl_planning_yaml) - controllers_yaml = load_yaml('iisy_config', 'config/gazebo_controllers.yaml') - moveit_controllers = { 'moveit_simple_controller_manager' : controllers_yaml, - 'moveit_controller_manager': 'moveit_simple_controller_manager/MoveItSimpleControllerManager'} + controllers_yaml = load_yaml('iisy_config', 'config/iisy_controllers.yml') + moveit_controllers = {'moveit_simple_controller_manager': controllers_yaml, + 'moveit_controller_manager': 'moveit_simple_controller_manager/MoveItSimpleControllerManager'} trajectory_execution = {'moveit_manage_controllers': True, 'trajectory_execution.allowed_execution_duration_scaling': 1.2, @@ -64,31 +68,30 @@ def generate_launch_description(): 'trajectory_execution.allowed_start_tolerance': 0.01} planning_scene_monitor_parameters = {"publish_planning_scene": True, - "publish_geometry_updates": True, - "publish_state_updates": True, - "publish_transforms_updates": True} + "publish_geometry_updates": True, + "publish_state_updates": True, + "publish_transforms_updates": True} - - #octomap_config = {'octomap_frame': 'camera_rgb_optical_frame', + # octomap_config = {'octomap_frame': 'camera_rgb_optical_frame', # 'octomap_resolution': 0.05, # 'max_range': 5.0} - #octomap_updater_config = load_yaml('moveit_tutorials', 'config/sensors_3d.yaml') + # octomap_updater_config = load_yaml('moveit_tutorials', 'config/sensors_3d.yaml') return LaunchDescription([ - SetEnvironmentVariable(name='LIBGL_ALWAYS_SOFTWARE', value='true'), + # SetEnvironmentVariable(name='LIBGL_ALWAYS_SOFTWARE', value='true'), - IncludeLaunchDescription( - PythonLaunchDescriptionSource(os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')), - launch_arguments={'world': world_path}.items() - ), + # IncludeLaunchDescription( + # PythonLaunchDescriptionSource(os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')), + # launch_arguments={'world': world_path}.items() + # ), - UnsetEnvironmentVariable(name='LIBGL_ALWAYS_SOFTWARE'), + # UnsetEnvironmentVariable(name='LIBGL_ALWAYS_SOFTWARE'), # Start Gazebo client - IncludeLaunchDescription( - PythonLaunchDescriptionSource(os.path.join(pkg_gazebo_ros, 'launch', 'gzclient.launch.py')) - ), + # IncludeLaunchDescription( + # PythonLaunchDescriptionSource(os.path.join(pkg_gazebo_ros, 'launch', 'gzclient.launch.py')) + # ), Node( package='tf2_ros', @@ -106,19 +109,19 @@ def generate_launch_description(): arguments=["-1.9", "1", "1", "0", "0", "0", "map", "lidar_2_link"] ), - Node( - package='gazebo_ros', - executable='spawn_entity.py', - arguments=['-entity', robot_name, - '-topic', 'robot_description', - '-x', '-1', - '-y', '-1', - '-z', '1', - '-Y', '0'], # Yaw - output='screen' - ), - #Node( + # package='gazebo_ros', + # executable='spawn_entity.py', + # arguments=['-entity', robot_name, + # '-topic', 'robot_description', + # '-x', '-1', + # '-y', '-1', + # '-z', '1', + # '-Y', '0'], # Yaw + # output='screen' + #), + + # Node( # package="gazebo_ros", # executable="spawn_entity.py", # arguments=[ @@ -126,15 +129,15 @@ def generate_launch_description(): # "-entity", LaunchConfiguration("iisy") # ], # output="screen" - #), + # ), - #Node( + # Node( # package='robot_state_publisher', # executable='robot_state_publisher', # name='robot_state_publisher', # output='both', # parameters=[robot_description] - #), + # ), Node( package='robot_state_publisher', @@ -143,8 +146,8 @@ def generate_launch_description(): ), Node( - package='joint_state_publisher', - executable='joint_state_publisher', + package='robot_state_publisher', + executable='robot_state_publisher', name='joint_state_publisher' ), @@ -165,21 +168,21 @@ def generate_launch_description(): controllers_yaml, ] ), - + Node(package='moveit_ros_move_group', - executable='move_group', - #prefix='xterm -fs 10 -e gdb --ex run --args', - output='screen', - parameters=[ - robot_description, - robot_description_semantic, - kinematics_yaml, - ompl_planning_pipeline_config, - trajectory_execution, - moveit_controllers, - planning_scene_monitor_parameters, - #octomap_config, - #octomap_updater_config - ] - ), - ]) \ No newline at end of file + executable='move_group', + # prefix='xterm -fs 10 -e gdb --ex run --args', + output='screen', + parameters=[ + robot_description, + robot_description_semantic, + kinematics_yaml, + ompl_planning_pipeline_config, + trajectory_execution, + moveit_controllers, + planning_scene_monitor_parameters, + # octomap_config, + # octomap_updater_config + ] + ), + ]) diff --git a/src/gz_ros2_control b/src/gz_ros2_control new file mode 160000 index 0000000..b0c29c2 --- /dev/null +++ b/src/gz_ros2_control @@ -0,0 +1 @@ +Subproject commit b0c29c2f3245eca25753fbe2527eeacc7cb9dac0 diff --git a/src/ign_actor_plugin/action/Animation.action b/src/ign_actor_plugin/action/Animation.action deleted file mode 100644 index a3b9dc8..0000000 --- a/src/ign_actor_plugin/action/Animation.action +++ /dev/null @@ -1,6 +0,0 @@ -string animation_name -float32 animation_speed ---- -bool success ---- -float32 progress diff --git a/src/ign_actor_plugin/action/Movement.action b/src/ign_actor_plugin/action/Movement.action deleted file mode 100644 index 664f850..0000000 --- a/src/ign_actor_plugin/action/Movement.action +++ /dev/null @@ -1,8 +0,0 @@ -string animation_name -float32 animation_speed -float32[3] target_position -float32[3] target_orientation ---- -bool success ---- -float32 progress diff --git a/src/ign_world/CMakeLists.txt b/src/ign_world/CMakeLists.txt new file mode 100644 index 0000000..e7ef416 --- /dev/null +++ b/src/ign_world/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 3.8) +project(ign_world) + +if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic) +endif() + +# find dependencies +find_package(ament_cmake REQUIRED) +# uncomment the following section in order to fill in +# further dependencies manually. +# find_package( REQUIRED) + +install(DIRECTORY launch DESTINATION share/${PROJECT_NAME}) +install(DIRECTORY world DESTINATION share/${PROJECT_NAME}) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + # the following line skips the linter which checks for copyrights + # uncomment the line when a copyright and license is not present in all source files + #set(ament_cmake_copyright_FOUND TRUE) + # the following line skips cpplint (only works in a git repo) + # uncomment the line when this package is not in a git repo + #set(ament_cmake_cpplint_FOUND TRUE) + ament_lint_auto_find_test_dependencies() +endif() + +ament_package() diff --git a/src/ign_world/launch/moveit_launch.py b/src/ign_world/launch/moveit_launch.py new file mode 100644 index 0000000..78a23df --- /dev/null +++ b/src/ign_world/launch/moveit_launch.py @@ -0,0 +1,238 @@ +import os +import subprocess + +import yaml +from launch import LaunchDescription +from launch_ros.actions import Node +from launch.actions import IncludeLaunchDescription, SetEnvironmentVariable, UnsetEnvironmentVariable +from launch_ros.substitutions import FindPackageShare +from launch.substitutions import Command, LaunchConfiguration +from launch.launch_description_sources import PythonLaunchDescriptionSource +from ament_index_python.packages import get_package_share_directory + + +def load_file(package_name, file_path): + package_path = get_package_share_directory(package_name) + absolute_file_path = os.path.join(package_path, file_path) + + try: + with open(absolute_file_path, 'r') as file: + print("Opened file") + return file.read() + except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available + print("ERROR: load_file " + package_name + " | " + file_path + " -> " + absolute_file_path) + return None + + +def load_xacro(package_name, file_path): + package_path = get_package_share_directory(package_name) + absolute_file_path = os.path.join(package_path, file_path) + + process = subprocess.run(["xacro", absolute_file_path], capture_output=True) + if process.returncode != 0: + print(process.stderr) + return process.stdout.decode("UTF-8") + + +def load_yaml(package_name, file_path): + package_path = get_package_share_directory(package_name) + absolute_file_path = os.path.join(package_path, file_path) + + try: + with open(absolute_file_path, 'r') as file: + print("Opened file") + return yaml.safe_load(file) + except EnvironmentError: # parent of IOError, OSError *and* WindowsError where available + print("ERROR: load_yaml " + package_name + " | " + file_path + " -> " + absolute_file_path) + + return None + + +def generate_launch_description(): + robot_name = "iisy" + # pkg_gazebo_ros = FindPackageShare(package='gazebo_ros').find('gazebo_ros') + world_path = os.path.join(FindPackageShare(package="gaz_simulation").find("gaz_simulation"), "world/test2.xml") + urdf_path = os.path.join(FindPackageShare(package="iisy_config").find("iisy_config"), "urdf/iisy.urdf") + + robot_description_config = load_xacro('iisy_config', 'urdf/iisy.urdf') + robot_description = {'robot_description': robot_description_config} + + robot_description_semantic_config = load_file('iisy_config', 'srdf/iisy.srdf') + robot_description_semantic = {'robot_description_semantic': robot_description_semantic_config} + + kinematics_yaml = load_yaml('iisy_config', 'config/kinematics.yml') + robot_description_kinematics = {'robot_description_kinematics': kinematics_yaml} + + ompl_planning_pipeline_config = {'move_group': { + 'planning_plugin': 'ompl_interface/OMPLPlanner', + 'request_adapters': """default_planner_request_adapters/AddTimeOptimalParameterization default_planner_request_adapters/FixWorkspaceBounds default_planner_request_adapters/FixStartStateBounds default_planner_request_adapters/FixStartStateCollision default_planner_request_adapters/FixStartStatePathConstraints""", + 'start_state_max_bounds_error': 0.1}} + ompl_planning_yaml = load_yaml('iisy_config', 'config/ompl_planning.yml') + ompl_planning_pipeline_config['move_group'].update(ompl_planning_yaml) + + controllers_yaml = load_yaml('iisy_config', 'config/iisy_moveit_controllers.yml') + moveit_controllers = {'moveit_simple_controller_manager': controllers_yaml, + 'moveit_controller_manager': 'moveit_simple_controller_manager/MoveItSimpleControllerManager'} + + trajectory_execution = {'moveit_manage_controllers': True, + 'trajectory_execution.allowed_execution_duration_scaling': 1.2, + 'trajectory_execution.allowed_goal_duration_margin': 0.5, + 'trajectory_execution.allowed_start_tolerance': 0.01} + + planning_scene_monitor_parameters = {"publish_planning_scene": True, + "publish_geometry_updates": True, + "publish_state_updates": True, + "publish_transforms_updates": True} + + planning = { + "move_group": { + "planning_plugin": "ompl_interface/OMPLPlanner", + "request_adapters": "default_planner_request_adapters/AddTimeParameterization default_planner_request_adapters/FixWorkspaceBounds default_planner_request_adapters/FixStartStateBounds default_planner_request_adapters/FixStartStateCollision default_planner_request_adapters/FixStartStatePathConstraints", + "start_state_max_bounds_error": 0.1 + } + } + + # octomap_config = {'octomap_frame': 'camera_rgb_optical_frame', + # 'octomap_resolution': 0.05, + # 'max_range': 5.0} + + # octomap_updater_config = load_yaml('moveit_tutorials', 'config/sensors_3d.yaml') + + return LaunchDescription([ + # SetEnvironmentVariable(name='LIBGL_ALWAYS_SOFTWARE', value='true'), + + # IncludeLaunchDescription( + # PythonLaunchDescriptionSource(os.path.join(pkg_gazebo_ros, 'launch', 'gzserver.launch.py')), + # launch_arguments={'world': world_path}.items() + # ), + + # UnsetEnvironmentVariable(name='LIBGL_ALWAYS_SOFTWARE'), + + # Start Gazebo client + # IncludeLaunchDescription( + # PythonLaunchDescriptionSource(os.path.join(pkg_gazebo_ros, 'launch', 'gzclient.launch.py')) + # ), + + Node( + package='ros_gz_sim', + executable='create', + arguments=['-world', 'empty', '-string', robot_description_config], + output='screen' + ), + + Node( + package='tf2_ros', + namespace='gaz_simulation', + executable='static_transform_publisher', + name='lidar_1_broadcaster', + arguments=[ + "--x", "1", + "--y", "-1.9", + "--z", "1", + "--roll", "1.5707963267949", + "--pitch", "0", + "--yaw", "0", + "--frame-id", "map", + "--child-frame-id", "lidar_1_link"] + ), + + Node( + package='tf2_ros', + namespace='gaz_simulation', + executable='static_transform_publisher', + name='lidar_2_broadcaster', + arguments=[ + "--x", "-1.9", + "--y", "1", + "--z", "1", + "--roll", "0", + "--pitch", "0", + "--yaw", "0", + "--frame-id", "map", + "--child-frame-id", "lidar_2_link"] + ), + + # Node( + # package='gazebo_ros', + # executable='spawn_entity.py', + # arguments=['-entity', robot_name, + # '-topic', 'robot_description', + # '-x', '-1', + # '-y', '-1', + # '-z', '1', + # '-Y', '0'], # Yaw + # output='screen' + # ), + + # Node( + # package="gazebo_ros", + # executable="spawn_entity.py", + # arguments=[ + # "-topic", "robot_description", + # "-entity", LaunchConfiguration("iisy") + # ], + # output="screen" + # ), + + # Node( + # package='robot_state_publisher', + # executable='robot_state_publisher', + # name='robot_state_publisher', + # output='both', + # parameters=[robot_description] + # ), + + Node( + package='robot_state_publisher', + executable='robot_state_publisher', + parameters=[robot_description] + ), + + # , + # Node( + # namespace='turtlesim1', + # executable='gazebo', + # name='gazebo', + # arguments=["test.xml"] + # ) + + # Node( + # package='controller_manager', + # name='gazebo_controller_spawner', + # executable='spawner', + # output='screen', + # parameters=[ + # controllers_yaml, + # ] + # ), + + Node(package='moveit_ros_move_group', + executable='move_group', + # prefix='xterm -fs 10 -e gdb --ex run --args', + output='screen', + parameters=[ + robot_description, + robot_description_semantic, + kinematics_yaml, + ompl_planning_pipeline_config, + trajectory_execution, + moveit_controllers, + planning_scene_monitor_parameters, + # octomap_config, + # octomap_updater_config + ] + ), + + Node( + package='rviz2', + executable='rviz2', + # arguments=['-d', os.path.join(pkg_ros_gz_sim_demos, 'rviz', 'gpu_lidar_bridge.rviz')], + parameters=[ + robot_description, + robot_description_semantic, + kinematics_yaml, + planning, + ], + ), + + ]) diff --git a/src/ign_world/package.xml b/src/ign_world/package.xml new file mode 100644 index 0000000..fde5e67 --- /dev/null +++ b/src/ign_world/package.xml @@ -0,0 +1,28 @@ + + ign_world + 0.244.1 + Launch file for simulation of pick and place + Apache 2.0 + Bastian Hofmann + + ament_cmake + + gazebo + + image_transport_plugins + robot_state_publisher + ros_ign_bridge + ros_ign_gazebo + ros_ign_image + + + rqt_image_view + rqt_plot + rqt_topic + rviz2 + xacro + + + ament_cmake + + diff --git a/src/gaz_simulation/world/gaz_new_test.sdf b/src/ign_world/world/gaz_new_test.sdf similarity index 82% rename from src/gaz_simulation/world/gaz_new_test.sdf rename to src/ign_world/world/gaz_new_test.sdf index 923ba91..e328515 100644 --- a/src/gaz_simulation/world/gaz_new_test.sdf +++ b/src/ign_world/world/gaz_new_test.sdf @@ -4,22 +4,10 @@ 0.001 1.0 - - - - - - - - + + + + true diff --git a/src/iisy_config/launch/debug.launch.py b/src/iisy_config/launch/debug.launch.py index 97da2fa..5274ccf 100644 --- a/src/iisy_config/launch/debug.launch.py +++ b/src/iisy_config/launch/debug.launch.py @@ -9,7 +9,7 @@ from launch.launch_description_sources import PythonLaunchDescriptionSource def generate_launch_description(): package_name = "gaz_simulation" - pkg_gazebo_ros = FindPackageShare('gazebo_ros').find('gazebo_ros') + pkg_gazebo_ros = FindPackageShare('gaz_simulation').find('gaz_simulation') path = FindPackageShare(package=package_name).find(package_name) world_path = os.path.join(path, "world/test2.xml") @@ -17,15 +17,15 @@ def generate_launch_description(): # ROS2 control demos via environment hook https://github.com/ros-controls/ros2_control_demos/tree/master/ros2_control_demo_description/rrbot_description # Also see https://colcon.readthedocs.io/en/released/developer/environment.html#dsv-files # Gazebo launch scripts append GAZEBO_MODEL_PATH with known paths, see https://github.com/ros-simulation/gazebo_ros_pkgs/blob/ab1ae5c05eda62674b36df74eb3be8c93cdc8761/gazebo_ros/launch/gzclient.launch.py#L26 - spawn_entity = Node( - package="gazebo_ros", - executable="spawn_entity.py", - arguments=[ - "-topic", "robot_description", - "-entity", "iisy" - ], - output="screen" - ) + #spawn_entity = Node( + # package="gazebo_ros", + # executable="spawn_entity.py", + # arguments=[ + # "-topic", "robot_description", + # "-entity", "iisy" + # ], + # output="screen" + #) bringup = IncludeLaunchDescription( PythonLaunchDescriptionSource( @@ -52,6 +52,6 @@ def generate_launch_description(): PythonLaunchDescriptionSource(os.path.join(pkg_gazebo_ros, 'launch', 'gzclient.launch.py')) ), - spawn_entity, + #spawn_entity, bringup, ]) \ No newline at end of file diff --git a/src/iisy_config/launch/lbr_control.launch.py b/src/iisy_config/launch/lbr_control.launch.py index 52f5d37..9733c6d 100644 --- a/src/iisy_config/launch/lbr_control.launch.py +++ b/src/iisy_config/launch/lbr_control.launch.py @@ -7,17 +7,11 @@ from launch_ros.substitutions import FindPackageShare def generate_launch_description(): - # Launch arguments - launch_args = [] - - launch_args.append( - DeclareLaunchArgument( - name="robot_description", - description="Robot description XML file." - ) - ) - + launch_args = [DeclareLaunchArgument( + name="robot_description", + description="Robot description XML file." + )] # Configure robot_description robot_description = {"robot_description": LaunchConfiguration("robot_description")} @@ -52,4 +46,5 @@ def generate_launch_description(): robot_state_publisher, joint_state_broadcaster, controller - ]) + ] + ) diff --git a/src/iisy_config/launch/lbr_simulation.launch.py b/src/iisy_config/launch/lbr_simulation.launch.py index 36b07b1..bbb1a6e 100644 --- a/src/iisy_config/launch/lbr_simulation.launch.py +++ b/src/iisy_config/launch/lbr_simulation.launch.py @@ -22,17 +22,18 @@ def generate_launch_description(): # ROS2 control demos via environment hook https://github.com/ros-controls/ros2_control_demos/tree/master/ros2_control_demo_description/rrbot_description # Also see https://colcon.readthedocs.io/en/released/developer/environment.html#dsv-files # Gazebo launch scripts append GAZEBO_MODEL_PATH with known paths, see https://github.com/ros-simulation/gazebo_ros_pkgs/blob/ab1ae5c05eda62674b36df74eb3be8c93cdc8761/gazebo_ros/launch/gzclient.launch.py#L26 - spawn_entity = Node( - package="gazebo_ros", - executable="spawn_entity.py", - arguments=[ - "-topic", "robot_description", - "-entity", "iisy" - ], - output="screen" - ) + + #spawn_entity = Node( + # package="gazebo_ros", + # executable="spawn_entity.py", + # arguments=[ + # "-topic", "robot_description", + # "-entity", "iisy" + # ], + # output="screen" + #) return LaunchDescription([ gazebo, - spawn_entity + #spawn_entity ]) diff --git a/src/iisy_config/urdf/iisy.urdf b/src/iisy_config/urdf/iisy.urdf index f440bf2..abc47c9 100644 --- a/src/iisy_config/urdf/iisy.urdf +++ b/src/iisy_config/urdf/iisy.urdf @@ -276,11 +276,10 @@ - - - - gazebo_ros2_control/GazeboSystem - + + + ign_ros2_control/IgnitionSystem + @@ -372,7 +371,7 @@ - + $(find iisy_config)/config/iisy_controllers.yml /iisy