generated from LCAS/ros2-teaching-ws
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c261d72
commit e21cdce
Showing
22 changed files
with
425 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
moveit_setup_assistant_config: | ||
urdf: | ||
package: mycobot_description | ||
relative_path: urdf/mecharm_270_m5/mecharm_270_m5.urdf | ||
srdf: | ||
relative_path: config/firefighter.srdf | ||
package_settings: | ||
author_name: Francesco Del Duchetto | ||
author_email: [email protected] | ||
generated_timestamp: 1737565099 | ||
control_xacro: | ||
command: | ||
- position | ||
state: | ||
- position | ||
- velocity | ||
modified_urdf: | ||
xacros: | ||
- control_xacro | ||
control_xacro: | ||
command: | ||
- position | ||
state: | ||
- position | ||
- velocity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.22) | ||
project(mecharm_moveit_config) | ||
|
||
find_package(ament_cmake REQUIRED) | ||
|
||
ament_package() | ||
|
||
install(DIRECTORY launch DESTINATION share/${PROJECT_NAME} | ||
PATTERN "setup_assistant.launch" EXCLUDE) | ||
install(DIRECTORY config DESTINATION share/${PROJECT_NAME}) | ||
install(FILES .setup_assistant DESTINATION share/${PROJECT_NAME}) |
56 changes: 56 additions & 0 deletions
56
src/mecharm_moveit_config/config/firefighter.ros2_control.xacro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version="1.0"?> | ||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
<xacro:macro name="firefighter_ros2_control" params="name initial_positions_file"> | ||
<xacro:property name="initial_positions" value="${load_yaml(initial_positions_file)['initial_positions']}"/> | ||
|
||
<ros2_control name="${name}" type="system"> | ||
<hardware> | ||
<!-- By default, set up controllers for simulation. This won't work on real hardware --> | ||
<plugin>mock_components/GenericSystem</plugin> | ||
</hardware> | ||
<joint name="joint1_to_base"> | ||
<command_interface name="position"/> | ||
<state_interface name="position"> | ||
<param name="initial_value">${initial_positions['joint1_to_base']}</param> | ||
</state_interface> | ||
<state_interface name="velocity"/> | ||
</joint> | ||
<joint name="joint2_to_joint1"> | ||
<command_interface name="position"/> | ||
<state_interface name="position"> | ||
<param name="initial_value">${initial_positions['joint2_to_joint1']}</param> | ||
</state_interface> | ||
<state_interface name="velocity"/> | ||
</joint> | ||
<joint name="joint3_to_joint2"> | ||
<command_interface name="position"/> | ||
<state_interface name="position"> | ||
<param name="initial_value">${initial_positions['joint3_to_joint2']}</param> | ||
</state_interface> | ||
<state_interface name="velocity"/> | ||
</joint> | ||
<joint name="joint4_to_joint3"> | ||
<command_interface name="position"/> | ||
<state_interface name="position"> | ||
<param name="initial_value">${initial_positions['joint4_to_joint3']}</param> | ||
</state_interface> | ||
<state_interface name="velocity"/> | ||
</joint> | ||
<joint name="joint5_to_joint4"> | ||
<command_interface name="position"/> | ||
<state_interface name="position"> | ||
<param name="initial_value">${initial_positions['joint5_to_joint4']}</param> | ||
</state_interface> | ||
<state_interface name="velocity"/> | ||
</joint> | ||
<joint name="joint6_to_joint5"> | ||
<command_interface name="position"/> | ||
<state_interface name="position"> | ||
<param name="initial_value">${initial_positions['joint6_to_joint5']}</param> | ||
</state_interface> | ||
<state_interface name="velocity"/> | ||
</joint> | ||
|
||
</ros2_control> | ||
</xacro:macro> | ||
</robot> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!--This does not replace URDF, and is not an extension of URDF. | ||
This is a format for representing semantic information about the robot structure. | ||
A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined | ||
--> | ||
<robot name="firefighter"> | ||
<!--GROUPS: Representation of a set of joints and links. This can be useful for specifying DOF to plan for, defining arms, end effectors, etc--> | ||
<!--LINKS: When a link is specified, the parent joint of that link (if it exists) is automatically included--> | ||
<!--JOINTS: When a joint is specified, the child link of that joint (which will always exist) is automatically included--> | ||
<!--CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are also included. This means that joints along the chain and the parent joint of the base link are included in the group--> | ||
<!--SUBGROUPS: Groups can also be formed by referencing to already defined group names--> | ||
<group name="mecharm"> | ||
<joint name="virtual_joint"/> | ||
<joint name="joint1_to_base"/> | ||
<joint name="joint2_to_joint1"/> | ||
<joint name="joint3_to_joint2"/> | ||
<joint name="joint4_to_joint3"/> | ||
<joint name="joint5_to_joint4"/> | ||
<joint name="joint6_to_joint5"/> | ||
</group> | ||
<!--GROUP STATES: Purpose: Define a named state for a particular group, in terms of joint values. This is useful to define states like 'folded arms'--> | ||
<group_state name="ready" group="mecharm"> | ||
<joint name="joint1_to_base" value="0"/> | ||
<joint name="joint2_to_joint1" value="0"/> | ||
<joint name="joint3_to_joint2" value="0"/> | ||
<joint name="joint4_to_joint3" value="0"/> | ||
<joint name="joint5_to_joint4" value="0"/> | ||
<joint name="joint6_to_joint5" value="0"/> | ||
</group_state> | ||
<!--END EFFECTOR: Purpose: Represent information about an end effector.--> | ||
<end_effector name="end-effector" parent_link="link6" group="mecharm"/> | ||
<!--VIRTUAL JOINT: Purpose: this element defines a virtual joint between a robot link and an external frame of reference (considered fixed with respect to the robot)--> | ||
<virtual_joint name="virtual_joint" type="fixed" parent_frame="world" child_link="base"/> | ||
<!--DISABLE COLLISIONS: By default it is assumed that any link of the robot could potentially come into collision with any other link in the robot. This tag disables collision checking between a specified pair of links. --> | ||
<disable_collisions link1="base" link2="link1" reason="Adjacent"/> | ||
<disable_collisions link1="base" link2="link2" reason="Never"/> | ||
<disable_collisions link1="base" link2="link3" reason="Never"/> | ||
<disable_collisions link1="base" link2="link4" reason="Never"/> | ||
<disable_collisions link1="base" link2="link5" reason="Never"/> | ||
<disable_collisions link1="base" link2="link6" reason="Never"/> | ||
<disable_collisions link1="link1" link2="link2" reason="Adjacent"/> | ||
<disable_collisions link1="link1" link2="link3" reason="Never"/> | ||
<disable_collisions link1="link1" link2="link4" reason="Never"/> | ||
<disable_collisions link1="link1" link2="link5" reason="Never"/> | ||
<disable_collisions link1="link1" link2="link6" reason="Never"/> | ||
<disable_collisions link1="link2" link2="link3" reason="Adjacent"/> | ||
<disable_collisions link1="link2" link2="link4" reason="Never"/> | ||
<disable_collisions link1="link2" link2="link5" reason="Never"/> | ||
<disable_collisions link1="link3" link2="link4" reason="Adjacent"/> | ||
<disable_collisions link1="link3" link2="link5" reason="Never"/> | ||
<disable_collisions link1="link3" link2="link6" reason="Never"/> | ||
<disable_collisions link1="link4" link2="link5" reason="Adjacent"/> | ||
<disable_collisions link1="link4" link2="link6" reason="Never"/> | ||
<disable_collisions link1="link5" link2="link6" reason="Adjacent"/> | ||
</robot> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0"?> | ||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="firefighter"> | ||
<xacro:arg name="initial_positions_file" default="initial_positions.yaml" /> | ||
|
||
<!-- Import firefighter urdf file --> | ||
<xacro:include filename="$(find mycobot_description)/urdf/mecharm_270_m5/mecharm_270_m5.urdf" /> | ||
|
||
<!-- Import control_xacro --> | ||
<xacro:include filename="firefighter.ros2_control.xacro" /> | ||
|
||
|
||
<xacro:firefighter_ros2_control name="FakeSystem" initial_positions_file="$(arg initial_positions_file)"/> | ||
|
||
</robot> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Default initial positions for firefighter's ros2_control fake system | ||
|
||
initial_positions: | ||
joint1_to_base: 0 | ||
joint2_to_joint1: 0 | ||
joint3_to_joint2: 0 | ||
joint4_to_joint3: 0 | ||
joint5_to_joint4: 0 | ||
joint6_to_joint5: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# joint_limits.yaml allows the dynamics properties specified in the URDF to be overwritten or augmented as needed | ||
|
||
# For beginners, we downscale velocity and acceleration limits. | ||
# You can always specify higher scaling factors (<= 1.0) in your motion requests. # Increase the values below to 1.0 to always move at maximum speed. | ||
default_velocity_scaling_factor: 0.1 | ||
default_acceleration_scaling_factor: 0.1 | ||
|
||
# Specific joint properties can be changed with the keys [max_position, min_position, max_velocity, max_acceleration] | ||
# Joint limits can be turned off with [has_velocity_limits, has_acceleration_limits] | ||
joint_limits: | ||
joint1_to_base: | ||
has_velocity_limits: false | ||
max_velocity: 0 | ||
has_acceleration_limits: false | ||
max_acceleration: 0 | ||
joint2_to_joint1: | ||
has_velocity_limits: false | ||
max_velocity: 0 | ||
has_acceleration_limits: false | ||
max_acceleration: 0 | ||
joint3_to_joint2: | ||
has_velocity_limits: false | ||
max_velocity: 0 | ||
has_acceleration_limits: false | ||
max_acceleration: 0 | ||
joint4_to_joint3: | ||
has_velocity_limits: false | ||
max_velocity: 0 | ||
has_acceleration_limits: false | ||
max_acceleration: 0 | ||
joint5_to_joint4: | ||
has_velocity_limits: false | ||
max_velocity: 0 | ||
has_acceleration_limits: false | ||
max_acceleration: 0 | ||
joint6_to_joint5: | ||
has_velocity_limits: false | ||
max_velocity: 0 | ||
has_acceleration_limits: false | ||
max_acceleration: 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
mecharm: | ||
kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin | ||
kinematics_solver_search_resolution: 0.0050000000000000001 | ||
kinematics_solver_timeout: 0.0050000000000000001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: base | ||
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: base | ||
Yaw: -0.623 | ||
Window Geometry: | ||
Height: 975 | ||
QMainWindow State: 000000ff00000000fd0000000100000000000002b400000375fc0200000005fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000004100fffffffb000000100044006900730070006c006100790073010000003d00000123000000c900fffffffb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e00670100000166000001910000018800fffffffb0000000800480065006c0070000000029a0000006e0000006e00fffffffb0000000a0056006900650077007301000002fd000000b5000000a400ffffff000001f60000037500000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 | ||
Width: 1200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# MoveIt uses this configuration for controller management | ||
|
||
moveit_controller_manager: moveit_simple_controller_manager/MoveItSimpleControllerManager | ||
|
||
moveit_simple_controller_manager: | ||
controller_names: | ||
- mecharm_controller | ||
|
||
mecharm_controller: | ||
type: FollowJointTrajectory | ||
action_ns: follow_joint_trajectory | ||
default: true | ||
joints: | ||
- joint1_to_base | ||
- joint2_to_joint1 | ||
- joint3_to_joint2 | ||
- joint4_to_joint3 | ||
- joint5_to_joint4 | ||
- joint6_to_joint5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# This config file is used by ros2_control | ||
controller_manager: | ||
ros__parameters: | ||
update_rate: 100 # Hz | ||
|
||
mecharm_controller: | ||
type: joint_trajectory_controller/JointTrajectoryController | ||
|
||
|
||
joint_state_broadcaster: | ||
type: joint_state_broadcaster/JointStateBroadcaster | ||
|
||
mecharm_controller: | ||
ros__parameters: | ||
joints: | ||
- joint1_to_base | ||
- joint2_to_joint1 | ||
- joint3_to_joint2 | ||
- joint4_to_joint3 | ||
- joint5_to_joint4 | ||
- joint6_to_joint5 | ||
command_interfaces: | ||
- position | ||
state_interfaces: | ||
- position | ||
- velocity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from moveit_configs_utils import MoveItConfigsBuilder | ||
from moveit_configs_utils.launches import generate_demo_launch | ||
|
||
|
||
def generate_launch_description(): | ||
moveit_config = MoveItConfigsBuilder("firefighter", package_name="mecharm_moveit_config").to_moveit_configs() | ||
return generate_demo_launch(moveit_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from moveit_configs_utils import MoveItConfigsBuilder | ||
from moveit_configs_utils.launches import generate_move_group_launch | ||
|
||
|
||
def generate_launch_description(): | ||
moveit_config = MoveItConfigsBuilder("firefighter", package_name="mecharm_moveit_config").to_moveit_configs() | ||
return generate_move_group_launch(moveit_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from moveit_configs_utils import MoveItConfigsBuilder | ||
from moveit_configs_utils.launches import generate_moveit_rviz_launch | ||
|
||
|
||
def generate_launch_description(): | ||
moveit_config = MoveItConfigsBuilder("firefighter", package_name="mecharm_moveit_config").to_moveit_configs() | ||
return generate_moveit_rviz_launch(moveit_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from moveit_configs_utils import MoveItConfigsBuilder | ||
from moveit_configs_utils.launches import generate_rsp_launch | ||
|
||
|
||
def generate_launch_description(): | ||
moveit_config = MoveItConfigsBuilder("firefighter", package_name="mecharm_moveit_config").to_moveit_configs() | ||
return generate_rsp_launch(moveit_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from moveit_configs_utils import MoveItConfigsBuilder | ||
from moveit_configs_utils.launches import generate_setup_assistant_launch | ||
|
||
|
||
def generate_launch_description(): | ||
moveit_config = MoveItConfigsBuilder("firefighter", package_name="mecharm_moveit_config").to_moveit_configs() | ||
return generate_setup_assistant_launch(moveit_config) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from moveit_configs_utils import MoveItConfigsBuilder | ||
from moveit_configs_utils.launches import generate_spawn_controllers_launch | ||
|
||
|
||
def generate_launch_description(): | ||
moveit_config = MoveItConfigsBuilder("firefighter", package_name="mecharm_moveit_config").to_moveit_configs() | ||
return generate_spawn_controllers_launch(moveit_config) |
7 changes: 7 additions & 0 deletions
7
src/mecharm_moveit_config/launch/static_virtual_joint_tfs.launch.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
from moveit_configs_utils import MoveItConfigsBuilder | ||
from moveit_configs_utils.launches import generate_static_virtual_joint_tfs_launch | ||
|
||
|
||
def generate_launch_description(): | ||
moveit_config = MoveItConfigsBuilder("firefighter", package_name="mecharm_moveit_config").to_moveit_configs() | ||
return generate_static_virtual_joint_tfs_launch(moveit_config) |
Oops, something went wrong.