commit 2fd1d2c7a651aa5c67e09fdde60ac18b0bd82e64 Author: root Date: Thu Aug 6 23:27:16 2026 +0200 Initial commit of Panther-PiPER custom ROS 2 packages diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..27db8fa --- /dev/null +++ b/.gitignore @@ -0,0 +1,21 @@ +# Ignore external third-party repositories imported via vcs +/behaviortree_ros2 +/husarion_components_description +/husarion_controllers +/husarion_gz_worlds +/husarion_ugv_ros +/joy2twist +/piper_ros + +# Python cache & temporary files +__pycache__/ +*.pyc +*.pyo +*.pyd + +# OS & IDE temporary files +.vscode/ +.idea/ +.DS_Store +*.swp +*~ diff --git a/panther_piper.repos b/panther_piper.repos new file mode 100644 index 0000000..0158940 --- /dev/null +++ b/panther_piper.repos @@ -0,0 +1,29 @@ +repositories: + behaviortree_ros2: + type: git + url: https://github.com/BehaviorTree/BehaviorTree.ROS2.git + version: humble + husarion_components_description: + type: git + url: https://github.com/husarion/husarion_components_description.git + version: main + husarion_controllers: + type: git + url: https://github.com/husarion/husarion_controllers.git + version: main + husarion_gz_worlds: + type: git + url: https://github.com/husarion/husarion_gz_worlds.git + version: main + husarion_ugv_ros: + type: git + url: https://github.com/husarion/husarion_ugv_ros.git + version: humble + joy2twist: + type: git + url: https://github.com/husarion/joy2twist.git + version: ros2 + piper_ros: + type: git + url: https://github.com/agilexrobotics/piper_ros.git + version: humble diff --git a/panther_piper_description/CMakeLists.txt b/panther_piper_description/CMakeLists.txt new file mode 100644 index 0000000..cf5f4a5 --- /dev/null +++ b/panther_piper_description/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.8) +project(panther_piper_description) + +find_package(ament_cmake REQUIRED) + +install(DIRECTORY + config + launch + urdf + rviz + DESTINATION share/${PROJECT_NAME} +) + +ament_package() diff --git a/panther_piper_description/config/controllers.yaml b/panther_piper_description/config/controllers.yaml new file mode 100644 index 0000000..539f074 --- /dev/null +++ b/panther_piper_description/config/controllers.yaml @@ -0,0 +1,97 @@ +controller_manager: + ros__parameters: + update_rate: 100 + + joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + drive_controller: + type: diff_drive_controller/DiffDriveController + imu_broadcaster: + type: imu_sensor_broadcaster/IMUSensorBroadcaster + arm_controller: + type: joint_trajectory_controller/JointTrajectoryController + gripper_controller: + type: joint_trajectory_controller/JointTrajectoryController + gripper8_controller: + type: joint_trajectory_controller/JointTrajectoryController + +imu_broadcaster: + ros__parameters: + sensor_name: imu + frame_id: imu_link + static_covariance_angular_velocity: [1.0e-4, 0.0, 0.0, 0.0, 1.0e-4, 0.0, 0.0, 0.0, 1.0e-4] + static_covariance_linear_acceleration: [7.6e-4, 0.0, 0.0, 0.0, 7.6e-4, 0.0, 0.0, 0.0, 7.6e-4] + +drive_controller: + ros__parameters: + left_wheel_names: [fl_wheel_joint, rl_wheel_joint] + right_wheel_names: [fr_wheel_joint, rr_wheel_joint] + + wheel_separation: 0.697 + wheel_radius: 0.1825 + wheel_separation_multiplier: 1.5 + + left_wheel_radius_multiplier: 1.0 + right_wheel_radius_multiplier: 1.0 + + publish_rate: 100.0 + odom_frame_id: odom + base_frame_id: base_link + twist_covariance_diagonal: [5.4e-5, 5.4e-5, 0.0, 0.0, 0.0, 1.9e-4] + + open_loop: false + position_feedback: false + velocity_rolling_window_size: 1 + enable_odom_tf: true + + cmd_vel_timeout: 0.2 + publish_limited_velocity: false + + linear: + x: + max_velocity: 2.0 + min_velocity: -2.0 + max_acceleration: 2.7 + max_deceleration: -2.7 + + angular: + z: + max_velocity: 4.0 + min_velocity: -4.0 + max_acceleration: 5.74 + max_deceleration: -5.74 + +arm_controller: + ros__parameters: + joints: + - joint1 + - joint2 + - joint3 + - joint4 + - joint5 + - joint6 + command_interfaces: + - position + state_interfaces: + - position + - velocity + +gripper_controller: + ros__parameters: + joints: + - joint7 + command_interfaces: + - position + state_interfaces: + - position + - velocity + +gripper8_controller: + ros__parameters: + joints: + - joint8 + command_interfaces: + - position + state_interfaces: + - position + - velocity diff --git a/panther_piper_description/launch/simulation.launch.py b/panther_piper_description/launch/simulation.launch.py new file mode 100644 index 0000000..2d5d7fa --- /dev/null +++ b/panther_piper_description/launch/simulation.launch.py @@ -0,0 +1,135 @@ +import os +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, SetEnvironmentVariable +from launch.launch_description_sources import PythonLaunchDescriptionSource +from launch.substitutions import Command, LaunchConfiguration +from launch_ros.actions import Node + +def generate_launch_description(): + pkg_path = get_package_share_directory('panther_piper_description') + + xacro_file = os.path.join(pkg_path, 'urdf', 'panther_piper.urdf.xacro') + controller_config = os.path.join(pkg_path, 'config', 'controllers.yaml') + + # Set Gazebo resource path to find meshes of all packages + ament_prefix_path = os.environ.get('AMENT_PREFIX_PATH', '') + resource_paths = [] + if ament_prefix_path: + for path in ament_prefix_path.split(':'): + if path: + pkg_share = os.path.join(path, 'share') + if os.path.isdir(pkg_share): + resource_paths.append(pkg_share) + + gz_resource_path_str = ':'.join(resource_paths) + + set_gz_resource_path = SetEnvironmentVariable( + name='GZ_SIM_RESOURCE_PATH', + value=gz_resource_path_str + ) + + set_ign_resource_path = SetEnvironmentVariable( + name='IGN_GAZEBO_RESOURCE_PATH', + value=gz_resource_path_str + ) + + # Process Xacro + robot_description_content = Command([ + 'xacro ', xacro_file, + ' use_sim:=true', + ' controller_config_file:=', controller_config + ]) + + robot_state_publisher_node = Node( + package='robot_state_publisher', + executable='robot_state_publisher', + name='robot_state_publisher', + output='screen', + parameters=[{ + 'robot_description': robot_description_content, + 'use_sim_time': True + }] + ) + + # Launch Gazebo + gz_sim_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource( + os.path.join(get_package_share_directory('ros_gz_sim'), 'launch', 'gz_sim.launch.py') + ), + launch_arguments={'gz_args': '-r empty.sdf'}.items(), + ) + + # Spawn Robot + spawn_robot_node = Node( + package='ros_gz_sim', + executable='create', + name='spawn_robot', + arguments=['-name', 'panther_piper', '-topic', 'robot_description'], + output='screen', + parameters=[{'use_sim_time': True}] + ) + + # Bridge for Clock + clock_bridge_node = Node( + package='ros_gz_bridge', + executable='parameter_bridge', + name='clock_bridge', + arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'], + output='screen' + ) + + # Controller Spawners + joint_state_broadcaster_spawner = Node( + package='controller_manager', + executable='spawner', + arguments=['joint_state_broadcaster', '--controller-manager', '/controller_manager'], + output='screen', + parameters=[{'use_sim_time': True}] + ) + + drive_controller_spawner = Node( + package='controller_manager', + executable='spawner', + arguments=['drive_controller', '--controller-manager', '/controller_manager'], + output='screen', + parameters=[{'use_sim_time': True}] + ) + + arm_controller_spawner = Node( + package='controller_manager', + executable='spawner', + arguments=['arm_controller', '--controller-manager', '/controller_manager'], + output='screen', + parameters=[{'use_sim_time': True}] + ) + + gripper_controller_spawner = Node( + package='controller_manager', + executable='spawner', + arguments=['gripper_controller', '--controller-manager', '/controller_manager'], + output='screen', + parameters=[{'use_sim_time': True}] + ) + + gripper8_controller_spawner = Node( + package='controller_manager', + executable='spawner', + arguments=['gripper8_controller', '--controller-manager', '/controller_manager'], + output='screen', + parameters=[{'use_sim_time': True}] + ) + + return LaunchDescription([ + set_gz_resource_path, + set_ign_resource_path, + robot_state_publisher_node, + gz_sim_launch, + spawn_robot_node, + clock_bridge_node, + joint_state_broadcaster_spawner, + drive_controller_spawner, + arm_controller_spawner, + gripper_controller_spawner, + gripper8_controller_spawner + ]) diff --git a/panther_piper_description/launch/view_robot.launch.py b/panther_piper_description/launch/view_robot.launch.py new file mode 100644 index 0000000..5615f9c --- /dev/null +++ b/panther_piper_description/launch/view_robot.launch.py @@ -0,0 +1,45 @@ +import os +from ament_index_python.packages import get_package_share_directory +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument +from launch.substitutions import Command, LaunchConfiguration +from launch_ros.actions import Node + +def generate_launch_description(): + pkg_path = get_package_share_directory('panther_piper_description') + + xacro_file = os.path.join(pkg_path, 'urdf', 'panther_piper.urdf.xacro') + + robot_description_content = Command([ + 'xacro ', xacro_file, + ' use_sim:=false' + ]) + + robot_state_publisher_node = Node( + package='robot_state_publisher', + executable='robot_state_publisher', + name='robot_state_publisher', + output='screen', + parameters=[{'robot_description': robot_description_content}] + ) + + joint_state_publisher_gui_node = Node( + package='joint_state_publisher_gui', + executable='joint_state_publisher_gui', + name='joint_state_publisher_gui', + output='screen' + ) + + rviz_node = Node( + package='rviz2', + executable='rviz2', + name='rviz2', + output='screen', + arguments=['-d', os.path.join(pkg_path, 'rviz', 'view_robot.rviz')] + ) + + return LaunchDescription([ + robot_state_publisher_node, + joint_state_publisher_gui_node, + rviz_node + ]) diff --git a/panther_piper_description/package.xml b/panther_piper_description/package.xml new file mode 100644 index 0000000..04d249c --- /dev/null +++ b/panther_piper_description/package.xml @@ -0,0 +1,21 @@ + + + + panther_piper_description + 0.0.1 + Robot description package integrating Husarion Panther UGV with AgileX PiPER robotic arm and ZED 2i camera + User + Apache-2.0 + + ament_cmake + + joint_state_publisher + joint_state_publisher_gui + robot_state_publisher + rviz2 + xacro + + + ament_cmake + + diff --git a/panther_piper_description/rviz/view_robot.rviz b/panther_piper_description/rviz/view_robot.rviz new file mode 100644 index 0000000..b9eb9e6 --- /dev/null +++ b/panther_piper_description/rviz/view_robot.rviz @@ -0,0 +1,69 @@ +Panels: + - Class: rviz_common/Displays + Help Height: 78 + Name: Displays + Property Tree Widget: + Expanded: + - /Grid1 + - /RobotModel1 + - /TF1 + Splitter Ratio: 0.5 + Tree Height: 557 +Visualization Manager: + Class: "" + Displays: + - Alpha: 1 + Cell Size: 1 + Class: rviz_default_plugins/Grid + Color: 160; 160; 160 + Enabled: true + Line Style: + Line Width: 0.03 + Value: Lines + Name: Grid + Normal Cell Count: 0 + Offset: + X: 0 + Y: 0 + Z: 0 + Plane: XY + Plane Cell Count: 10 + Reference Frame: + Value: true + - Class: rviz_default_plugins/RobotModel + Description Source: Topic + Description Topic: + Depth: 5 + Durability Policy: Volatile + History Policy: Keep Last + Reliability Policy: Reliable + Value: /robot_description + Enabled: true + Name: RobotModel + Visual Enabled: true + Value: true + - Class: rviz_default_plugins/TF + Enabled: true + Name: TF + Show Axes: true + Show Arrows: true + Show Names: true + Value: true + Global Options: + Background Color: 48; 48; 48 + Fixed Frame: base_link + Frame Rate: 30 + Tools: + - Class: rviz_default_plugins/Interact + - Class: rviz_default_plugins/MoveCamera + Views: + Current: + Class: rviz_default_plugins/Orbit + Distance: 3.0 + Focal Point: + X: 0 + Y: 0 + Z: 0.5 + Name: Current View + Pitch: 0.3 + Yaw: 0.8 diff --git a/panther_piper_description/urdf/panther_piper.urdf.xacro b/panther_piper_description/urdf/panther_piper.urdf.xacro new file mode 100644 index 0000000..457328f --- /dev/null +++ b/panther_piper_description/urdf/panther_piper.urdf.xacro @@ -0,0 +1,213 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + gz_ros2_control/GazeboSimSystem + + + + mock_components/GenericSystem + + + + + 0.0 + + + + + 0.0 + + + + + 0.0 + + + + + 0.0 + + + + + 0.0 + + + + + 0.0 + + + + + 0.0 + + + + + 0.0 + + + + + diff --git a/panther_piper_description/urdf/piper_description_modified.xacro b/panther_piper_description/urdf/piper_description_modified.xacro new file mode 100755 index 0000000..fc3ade8 --- /dev/null +++ b/panther_piper_description/urdf/piper_description_modified.xacro @@ -0,0 +1,567 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + transmission_interface/SimpleTransmission + + hardware_interface/PositionJointInterface + + + hardware_interface/PositionJointInterface + 1 + + + + + + + + + + + + + + + + + diff --git a/panther_piper_moveit_config/CMakeLists.txt b/panther_piper_moveit_config/CMakeLists.txt new file mode 100644 index 0000000..2f74e38 --- /dev/null +++ b/panther_piper_moveit_config/CMakeLists.txt @@ -0,0 +1,12 @@ +cmake_minimum_required(VERSION 3.8) +project(panther_piper_moveit_config) + +find_package(ament_cmake REQUIRED) + +install(DIRECTORY + config + launch + DESTINATION share/${PROJECT_NAME} +) + +ament_package() diff --git a/panther_piper_moveit_config/config/initial_positions.yaml b/panther_piper_moveit_config/config/initial_positions.yaml new file mode 100644 index 0000000..df4836a --- /dev/null +++ b/panther_piper_moveit_config/config/initial_positions.yaml @@ -0,0 +1,8 @@ +initial_positions: + joint1: 0 + joint2: 0 + joint3: 0 + joint4: 0 + joint5: 0 + joint6: 0 + joint7: 0 diff --git a/panther_piper_moveit_config/config/joint_limits.yaml b/panther_piper_moveit_config/config/joint_limits.yaml new file mode 100644 index 0000000..db500ef --- /dev/null +++ b/panther_piper_moveit_config/config/joint_limits.yaml @@ -0,0 +1,39 @@ +default_velocity_scaling_factor: 0.1 +default_acceleration_scaling_factor: 0.1 + +joint_limits: + joint1: + has_velocity_limits: true + max_velocity: 5.0 + has_acceleration_limits: false + max_acceleration: 0 + joint2: + has_velocity_limits: true + max_velocity: 5.0 + has_acceleration_limits: false + max_acceleration: 0 + joint3: + has_velocity_limits: true + max_velocity: 5.0 + has_acceleration_limits: false + max_acceleration: 0 + joint4: + has_velocity_limits: true + max_velocity: 5.0 + has_acceleration_limits: false + max_acceleration: 0 + joint5: + has_velocity_limits: true + max_velocity: 5.0 + has_acceleration_limits: false + max_acceleration: 0 + joint6: + has_velocity_limits: true + max_velocity: 3.0 + has_acceleration_limits: false + max_acceleration: 0 + joint7: + has_velocity_limits: true + max_velocity: 1.0 + has_acceleration_limits: false + max_acceleration: 0 diff --git a/panther_piper_moveit_config/config/kinematics.yaml b/panther_piper_moveit_config/config/kinematics.yaml new file mode 100644 index 0000000..bc2e015 --- /dev/null +++ b/panther_piper_moveit_config/config/kinematics.yaml @@ -0,0 +1,8 @@ +arm: + kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin + kinematics_solver_search_resolution: 0.005 + kinematics_solver_timeout: 0.005 +gripper: + kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin + kinematics_solver_search_resolution: 0.005 + kinematics_solver_timeout: 0.005 diff --git a/panther_piper_moveit_config/config/moveit.rviz b/panther_piper_moveit_config/config/moveit.rviz new file mode 100644 index 0000000..f31651e --- /dev/null +++ b/panther_piper_moveit_config/config/moveit.rviz @@ -0,0 +1,51 @@ +Panels: + - Class: rviz_common/Displays + Name: Displays + Property Tree Widget: + Expanded: + - /MotionPlanning1 + - Class: rviz_common/Help + Name: Help + - Class: rviz_common/Views + Name: Views +Visualization Manager: + Displays: + - Class: rviz_default_plugins/Grid + Name: Grid + Value: true + - Class: moveit_rviz_plugin/MotionPlanning + Name: MotionPlanning + Planned Path: + Loop Animation: true + State Display Time: 0.05 s + Trajectory Topic: display_planned_path + Planning Scene Topic: monitored_planning_scene + Robot Description: robot_description + Scene Geometry: + Scene Alpha: 1 + Scene Robot: + Robot Alpha: 0.5 + Value: true + Global Options: + Fixed Frame: world + Tools: + - Class: rviz_default_plugins/Interact + - Class: rviz_default_plugins/MoveCamera + - Class: rviz_default_plugins/Select + Value: true + Views: + Current: + Class: rviz_default_plugins/Orbit + Distance: 2.0 + Focal Point: + X: -0.1 + Y: 0.25 + Z: 0.30 + Name: Current View + Pitch: 0.5 + Target Frame: world + Yaw: -0.623 +Window Geometry: + Height: 975 + QMainWindow State: 000000ff00000000fd0000000100000000000002b400000375fc0200000005fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000004100fffffffb000000100044006900730070006c006100790073010000003d00000123000000c900fffffffb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e00670100000166000001910000018800fffffffb0000000800480065006c0070000000029a0000006e0000006e00fffffffb0000000a0056006900650077007301000002fd000000b5000000a400ffffff000001f60000037500000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 + Width: 1200 diff --git a/panther_piper_moveit_config/config/moveit_controllers.yaml b/panther_piper_moveit_config/config/moveit_controllers.yaml new file mode 100644 index 0000000..cc64ff0 --- /dev/null +++ b/panther_piper_moveit_config/config/moveit_controllers.yaml @@ -0,0 +1,25 @@ +moveit_controller_manager: moveit_simple_controller_manager/MoveItSimpleControllerManager + +moveit_simple_controller_manager: + update_rate: 100 + controller_names: + - arm_controller + - gripper_controller + + arm_controller: + type: FollowJointTrajectory + action_ns: follow_joint_trajectory + default: true + joints: + - joint1 + - joint2 + - joint3 + - joint4 + - joint5 + - joint6 + gripper_controller: + type: FollowJointTrajectory + action_ns: follow_joint_trajectory + default: true + joints: + - joint7 diff --git a/panther_piper_moveit_config/config/panther_piper.srdf b/panther_piper_moveit_config/config/panther_piper.srdf new file mode 100644 index 0000000..f29709e --- /dev/null +++ b/panther_piper_moveit_config/config/panther_piper.srdf @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/panther_piper_moveit_config/config/panther_piper.urdf.xacro b/panther_piper_moveit_config/config/panther_piper.urdf.xacro new file mode 100644 index 0000000..ac45f3b --- /dev/null +++ b/panther_piper_moveit_config/config/panther_piper.urdf.xacro @@ -0,0 +1,4 @@ + + + + diff --git a/panther_piper_moveit_config/config/pilz_cartesian_limits.yaml b/panther_piper_moveit_config/config/pilz_cartesian_limits.yaml new file mode 100644 index 0000000..b2997ca --- /dev/null +++ b/panther_piper_moveit_config/config/pilz_cartesian_limits.yaml @@ -0,0 +1,6 @@ +# Limits for the Pilz planner +cartesian_limits: + max_trans_vel: 1.0 + max_trans_acc: 2.25 + max_trans_dec: -5.0 + max_rot_vel: 1.57 diff --git a/panther_piper_moveit_config/launch/demo.launch.py b/panther_piper_moveit_config/launch/demo.launch.py new file mode 100644 index 0000000..a68ba8b --- /dev/null +++ b/panther_piper_moveit_config/launch/demo.launch.py @@ -0,0 +1,16 @@ +import os +from ament_index_python.packages import get_package_share_directory +from moveit_configs_utils import MoveItConfigsBuilder +from moveit_configs_utils.launches import generate_demo_launch + +def generate_launch_description(): + moveit_config = ( + MoveItConfigsBuilder("panther_piper", package_name="panther_piper_moveit_config") + .robot_description(file_path=os.path.join( + get_package_share_directory("panther_piper_description"), + "urdf", + "panther_piper.urdf.xacro" + ), mappings={"use_sim": "true"}) + .to_moveit_configs() + ) + return generate_demo_launch(moveit_config) diff --git a/panther_piper_moveit_config/launch/move_group.launch.py b/panther_piper_moveit_config/launch/move_group.launch.py new file mode 100644 index 0000000..d606d59 --- /dev/null +++ b/panther_piper_moveit_config/launch/move_group.launch.py @@ -0,0 +1,42 @@ +import os +from ament_index_python.packages import get_package_share_directory +from moveit_configs_utils import MoveItConfigsBuilder +from launch import LaunchDescription +from launch_ros.actions import Node + +def generate_launch_description(): + moveit_config = ( + MoveItConfigsBuilder("panther_piper", package_name="panther_piper_moveit_config") + .robot_description(file_path=os.path.join( + get_package_share_directory("panther_piper_description"), + "urdf", + "panther_piper.urdf.xacro" + ), mappings={"use_sim": "true"}) + .to_moveit_configs() + ) + + # Compile move_group parameters + move_group_params = [ + moveit_config.to_dict(), + { + "publish_robot_description_semantic": True, + "allow_trajectory_execution": True, + "capabilities": "", + "disable_capabilities": "", + "publish_planning_scene": True, + "publish_geometry_updates": True, + "publish_state_updates": True, + "publish_transforms_updates": True, + "monitor_dynamics": False, + "use_sim_time": True, + } + ] + + return LaunchDescription([ + Node( + package="moveit_ros_move_group", + executable="move_group", + output="screen", + parameters=move_group_params, + ) + ]) diff --git a/panther_piper_moveit_config/launch/moveit_rviz.launch.py b/panther_piper_moveit_config/launch/moveit_rviz.launch.py new file mode 100644 index 0000000..8548e4c --- /dev/null +++ b/panther_piper_moveit_config/launch/moveit_rviz.launch.py @@ -0,0 +1,39 @@ +import os +from ament_index_python.packages import get_package_share_directory +from moveit_configs_utils import MoveItConfigsBuilder +from launch import LaunchDescription +from launch_ros.actions import Node + +def generate_launch_description(): + moveit_config = ( + MoveItConfigsBuilder("panther_piper", package_name="panther_piper_moveit_config") + .robot_description(file_path=os.path.join( + get_package_share_directory("panther_piper_description"), + "urdf", + "panther_piper.urdf.xacro" + ), mappings={"use_sim": "true"}) + .to_moveit_configs() + ) + + rviz_parameters = [ + moveit_config.planning_pipelines, + moveit_config.robot_description_kinematics, + moveit_config.joint_limits, + {"use_sim_time": True} + ] + + rviz_config = os.path.join( + get_package_share_directory("panther_piper_moveit_config"), + "config", + "moveit.rviz" + ) + + return LaunchDescription([ + Node( + package="rviz2", + executable="rviz2", + output="screen", + arguments=["-d", rviz_config], + parameters=rviz_parameters, + ) + ]) diff --git a/panther_piper_moveit_config/package.xml b/panther_piper_moveit_config/package.xml new file mode 100644 index 0000000..9a6f7bc --- /dev/null +++ b/panther_piper_moveit_config/package.xml @@ -0,0 +1,23 @@ + + + + panther_piper_moveit_config + 0.0.1 + MoveIt 2 configuration package for Panther UGV with PiPER arm + User + Apache-2.0 + + ament_cmake + + moveit_ros_move_group + moveit_kinematics + moveit_planners_ompl + moveit_simple_controller_manager + joint_state_publisher + robot_state_publisher + rviz2 + + + ament_cmake + +