diff --git a/README.md b/README.md index 98683c63..b5279917 100644 --- a/README.md +++ b/README.md @@ -14,18 +14,15 @@ https://github.com/user-attachments/assets/90b44ef4-5cdc-4bf5-b56f-be2a5ff264b4 - - -- openarm_bimanual_description: dual arm urdf with torso and realsense head camera -- openarm_bimanual_moveit_config: bimanual motion planning with OctoMap occupancy grid mapping -- openarm_bimanual_bringup: setup scripts for bimanual openarm +- openarm_description: OpenArm URDF and assets at [github.com/enactic/openarm_description](https://github.com/enactic/openarm_description) +- openarm_bimanual_moveit_config: bimanual motion planning with [moveit2](https://github.com/moveit/moveit2) - openarm_bringup: setup scripts for single physical openarm -- openarm_description: single arm urdf - openarm_hardware: hardware interface for ros2_control -- openarm_moveit_config: motion planning with [moveit2](https://github.com/moveit/moveit2) -### Description Packages +### Description Package + +URDF generation scripts and assets are available in the [openarm_description](https://github.com/enactic/openarm_description) repository. Each link has a visual mesh and a collision mesh, as shown in the figures below: @@ -34,7 +31,11 @@ Each link has a visual mesh and a collision mesh, as shown in the figures below: ### MoveIt2 Support -https://github.com/user-attachments/assets/a0f962e5-6150-49ce-b18e-9914bcb322ef + + +https://github.com/user-attachments/assets/3a722d5b-c465-4077-be94-f67c5a3353b2 + + --- diff --git a/openarm/package.xml b/openarm/package.xml index 2ae166bb..03966be1 100644 --- a/openarm/package.xml +++ b/openarm/package.xml @@ -17,7 +17,7 @@ --> openarm - 0.3.0 + 1.0.0 Metapackage for OpenArm Thomason Zhou Apache-2.0 @@ -28,7 +28,6 @@ openarm_bringup openarm_description openarm_hardware - ament_lint_auto ament_lint_common diff --git a/openarm_bimanual_moveit_config/.setup_assistant b/openarm_bimanual_moveit_config/.setup_assistant index e48c9d94..5797bee8 100644 --- a/openarm_bimanual_moveit_config/.setup_assistant +++ b/openarm_bimanual_moveit_config/.setup_assistant @@ -1,24 +1,28 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - moveit_setup_assistant_config: urdf: - package: openarm_bimanual_description - relative_path: urdf/openarm_bimanual.urdf.xacro + package: openarm_description + relative_path: urdf/robot/v10.urdf.xacro + xacro_args: bimanual:=true srdf: relative_path: config/openarm_bimanual.srdf package_settings: author_name: Thomason Zhou author_email: t95zhou@uwaterloo.ca - generated_timestamp: 1745486864 + generated_timestamp: 1753031250 + control_xacro: + command: + - position + - velocity + state: + - position + - velocity + modified_urdf: + xacros: + - control_xacro + control_xacro: + command: + - position + - velocity + state: + - position + - velocity \ No newline at end of file diff --git a/openarm_bimanual_moveit_config/config/initial_positions.yaml b/openarm_bimanual_moveit_config/config/initial_positions.yaml index 4740b894..91765227 100644 --- a/openarm_bimanual_moveit_config/config/initial_positions.yaml +++ b/openarm_bimanual_moveit_config/config/initial_positions.yaml @@ -1,33 +1,19 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# Default initial positions for openarm_bimanual's ros2_control fake system +# Default initial positions for openarm's ros2_control fake system initial_positions: - left_gripper: 0 - left_rev1: 0 - left_rev2: 0 - left_rev3: 0 - left_rev4: 0 - left_rev5: 0 - left_rev6: 0 - left_rev7: 0 - right_gripper: 0 - right_rev1: 0 - right_rev2: 0 - right_rev3: 0 - right_rev4: 0 - right_rev5: 0 - right_rev6: 0 - right_rev7: 0 + openarm_left_finger_joint1: 0 + openarm_left_joint1: 0 + openarm_left_joint2: 0 + openarm_left_joint3: 0 + openarm_left_joint4: 0 + openarm_left_joint5: 0 + openarm_left_joint6: 0 + openarm_left_joint7: 0 + openarm_right_finger_joint1: 0 + openarm_right_joint1: 0 + openarm_right_joint2: 0 + openarm_right_joint3: 0 + openarm_right_joint4: 0 + openarm_right_joint5: 0 + openarm_right_joint6: 0 + openarm_right_joint7: 0 \ No newline at end of file diff --git a/openarm_bimanual_moveit_config/config/joint_limits.yaml b/openarm_bimanual_moveit_config/config/joint_limits.yaml index 69ce9b09..b72ac015 100644 --- a/openarm_bimanual_moveit_config/config/joint_limits.yaml +++ b/openarm_bimanual_moveit_config/config/joint_limits.yaml @@ -1,17 +1,3 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # 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. @@ -22,83 +8,83 @@ 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: - left_gripper: - has_velocity_limits: true - max_velocity: 0.10000000000000001 - has_acceleration_limits: false - max_acceleration: 0 - left_rev1: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - left_rev2: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - left_rev3: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - left_rev4: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - left_rev5: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - left_rev6: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - left_rev7: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - right_gripper: - has_velocity_limits: true - max_velocity: 0.10000000000000001 - has_acceleration_limits: false - max_acceleration: 0 - right_rev1: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - right_rev2: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - right_rev3: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - right_rev4: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - right_rev5: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - right_rev6: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 - right_rev7: - has_velocity_limits: false - max_velocity: 0 - has_acceleration_limits: false - max_acceleration: 0 + openarm_left_finger_joint1: + has_velocity_limits: true + max_velocity: 10.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_left_joint1: + has_velocity_limits: true + max_velocity: 45.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_left_joint2: + has_velocity_limits: true + max_velocity: 45.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_left_joint3: + has_velocity_limits: true + max_velocity: 8.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_left_joint4: + has_velocity_limits: true + max_velocity: 8.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_left_joint5: + has_velocity_limits: true + max_velocity: 30.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_left_joint6: + has_velocity_limits: true + max_velocity: 30.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_left_joint7: + has_velocity_limits: true + max_velocity: 30.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_right_finger_joint1: + has_velocity_limits: true + max_velocity: 10.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_right_joint1: + has_velocity_limits: true + max_velocity: 45.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_right_joint2: + has_velocity_limits: true + max_velocity: 45.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_right_joint3: + has_velocity_limits: true + max_velocity: 8.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_right_joint4: + has_velocity_limits: true + max_velocity: 8.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_right_joint5: + has_velocity_limits: true + max_velocity: 30.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_right_joint6: + has_velocity_limits: true + max_velocity: 30.0 + has_acceleration_limits: false + max_acceleration: 0.0 + openarm_right_joint7: + has_velocity_limits: true + max_velocity: 30.0 + has_acceleration_limits: false + max_acceleration: 0.0 \ No newline at end of file diff --git a/openarm_bimanual_moveit_config/config/kinematics.yaml b/openarm_bimanual_moveit_config/config/kinematics.yaml index 050f9026..8ad55714 100644 --- a/openarm_bimanual_moveit_config/config/kinematics.yaml +++ b/openarm_bimanual_moveit_config/config/kinematics.yaml @@ -1,17 +1,3 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - left_arm: kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin kinematics_solver_search_resolution: 0.0050000000000000001 @@ -31,4 +17,4 @@ right_side: upper_body: kinematics_solver: kdl_kinematics_plugin/KDLKinematicsPlugin kinematics_solver_search_resolution: 0.0050000000000000001 - kinematics_solver_timeout: 0.0050000000000000001 + kinematics_solver_timeout: 0.0050000000000000001 \ No newline at end of file diff --git a/openarm_bimanual_moveit_config/config/moveit.rviz b/openarm_bimanual_moveit_config/config/moveit.rviz index 6afd61b2..3f2746d9 100644 --- a/openarm_bimanual_moveit_config/config/moveit.rviz +++ b/openarm_bimanual_moveit_config/config/moveit.rviz @@ -1,27 +1,14 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - Panels: - Class: rviz_common/Displays - Help Height: 70 + Help Height: 138 Name: Displays Property Tree Widget: Expanded: - /MotionPlanning1 + - /MotionPlanning1/Scene Robot1 - /MotionPlanning1/Planning Request1 Splitter Ratio: 0.5 - Tree Height: 160 + Tree Height: 254 - Class: rviz_common/Help Name: Help - Class: rviz_common/Views @@ -81,184 +68,133 @@ Visualization Manager: Expand Link Details: false Expand Tree: false Link Tree Style: Links in Alphabetic Order - base_link: + openarm_body_link0: Alpha: 1 Show Axes: false Show Trail: false - camera_accel_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_accel_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_bottom_screw_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_color_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_color_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_depth_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_depth_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_gyro_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_gyro_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_infra1_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_infra1_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_infra2_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_infra2_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_link: + Value: true + openarm_left_hand: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_dummy_link: + openarm_left_hand_tcp: Alpha: 1 Show Axes: false Show Trail: false - left_gripper_center: + openarm_left_left_finger: Alpha: 1 Show Axes: false Show Trail: false - left_link1: + Value: true + openarm_left_link0: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link2: + openarm_left_link1: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link3: + openarm_left_link2: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link4: + openarm_left_link3: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link5: + openarm_left_link4: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link6: + openarm_left_link5: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link7: + openarm_left_link6: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link8: + openarm_left_link7: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link_left_jaw: + openarm_left_link8: Alpha: 1 Show Axes: false Show Trail: false - Value: true - left_link_right_jaw: + openarm_left_right_finger: Alpha: 1 Show Axes: false Show Trail: false Value: true - pedestal_link: + openarm_right_hand: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_dummy_link: + openarm_right_hand_tcp: Alpha: 1 Show Axes: false Show Trail: false - right_gripper_center: + openarm_right_left_finger: Alpha: 1 Show Axes: false Show Trail: false - right_link1: + Value: true + openarm_right_link0: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link2: + openarm_right_link1: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link3: + openarm_right_link2: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link4: + openarm_right_link3: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link5: + openarm_right_link4: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link6: + openarm_right_link5: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link7: + openarm_right_link6: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link8: + openarm_right_link7: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link_left_jaw: + openarm_right_link8: Alpha: 1 Show Axes: false Show Trail: false - Value: true - right_link_right_jaw: + openarm_right_right_finger: Alpha: 1 Show Axes: false Show Trail: false @@ -287,8 +223,8 @@ Visualization Manager: Planning Request: Colliding Link Color: 255; 0; 0 Goal State Alpha: 1 - Goal State Color: 250; 128; 0 - Interactive Marker Size: 0.15000000596046448 + Goal State Color: 20; 93; 250 + Interactive Marker Size: 0 Joint Violation Color: 255; 0; 255 Planning Group: upper_body Query Goal State: true @@ -313,184 +249,133 @@ Visualization Manager: Expand Link Details: false Expand Tree: false Link Tree Style: Links in Alphabetic Order - base_link: + openarm_body_link0: Alpha: 1 Show Axes: false Show Trail: false - camera_accel_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_accel_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_bottom_screw_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_color_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_color_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_depth_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_depth_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_gyro_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_gyro_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_infra1_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_infra1_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_infra2_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_infra2_optical_frame: - Alpha: 1 - Show Axes: false - Show Trail: false - camera_link: + Value: true + openarm_left_hand: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_dummy_link: + openarm_left_hand_tcp: Alpha: 1 Show Axes: false Show Trail: false - left_gripper_center: + openarm_left_left_finger: Alpha: 1 Show Axes: false Show Trail: false - left_link1: + Value: true + openarm_left_link0: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link2: + openarm_left_link1: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link3: + openarm_left_link2: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link4: + openarm_left_link3: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link5: + openarm_left_link4: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link6: + openarm_left_link5: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link7: + openarm_left_link6: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link8: + openarm_left_link7: Alpha: 1 Show Axes: false Show Trail: false Value: true - left_link_left_jaw: + openarm_left_link8: Alpha: 1 Show Axes: false Show Trail: false - Value: true - left_link_right_jaw: + openarm_left_right_finger: Alpha: 1 Show Axes: false Show Trail: false Value: true - pedestal_link: + openarm_right_hand: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_dummy_link: + openarm_right_hand_tcp: Alpha: 1 Show Axes: false Show Trail: false - right_gripper_center: + openarm_right_left_finger: Alpha: 1 Show Axes: false Show Trail: false - right_link1: + Value: true + openarm_right_link0: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link2: + openarm_right_link1: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link3: + openarm_right_link2: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link4: + openarm_right_link3: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link5: + openarm_right_link4: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link6: + openarm_right_link5: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link7: + openarm_right_link6: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link8: + openarm_right_link7: Alpha: 1 Show Axes: false Show Trail: false Value: true - right_link_left_jaw: + openarm_right_link8: Alpha: 1 Show Axes: false Show Trail: false - Value: true - right_link_right_jaw: + openarm_right_right_finger: Alpha: 1 Show Axes: false Show Trail: false @@ -522,30 +407,31 @@ Visualization Manager: Views: Current: Class: rviz_default_plugins/Orbit - Distance: 3.150280475616455 + Distance: 1.3624029159545898 Enable Stereo Rendering: Stereo Eye Separation: 0.05999999865889549 Stereo Focal Distance: 1 Swap Stereo Eyes: false Value: false Focal Point: - X: -0.10000000149011612 - Y: 0.25 - Z: 0.30000001192092896 + X: -0.05883333832025528 + Y: 0.2625991404056549 + Z: 0.3334124982357025 Focal Shape Fixed Size: true Focal Shape Size: 0.05000000074505806 Invert Z Axis: false Name: Current View Near Clip Distance: 0.009999999776482582 - Pitch: 0.5 + Pitch: 0.31999996304512024 Target Frame: world Value: Orbit (rviz_default_plugins) - Yaw: -0.6230000257492065 + Yaw: 0.16200032830238342 Saved: ~ Window Geometry: Displays: collapsed: false - Height: 975 + Width: 1280 + Height: 720 Help: collapsed: false Hide Left Dock: false @@ -554,9 +440,8 @@ Window Geometry: collapsed: false MotionPlanning - Trajectory Slider: collapsed: false - QMainWindow State: 000000ff00000000fd0000000100000000000002b400000375fc0200000005fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000004100fffffffb000000100044006900730070006c006100790073010000003d00000123000000c900fffffffb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e00670100000166000001910000017d00fffffffb0000000800480065006c0070000000029a0000006e0000006e00fffffffb0000000a0056006900650077007301000002fd000000b5000000a400ffffff000001f60000037500000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 + QMainWindow State: 000000ff00000000fd00000001000000000000036a000006f0fc0200000005fb00000044004d006f00740069006f006e0050006c0061006e006e0069006e00670020002d0020005400720061006a006500630074006f0072007900200053006c00690064006500720000000000ffffffff0000007000fffffffb000000100044006900730070006c0061007900730100000069000001ec0000017800fffffffb0000001c004d006f00740069006f006e0050006c0061006e006e0069006e006701000002610000036f0000028e00fffffffb0000000800480065006c0070000000029a0000006e000000cf00fffffffb0000000a0056006900650077007301000005dc0000017d0000012300ffffff0000096a000006f000000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 Views: collapsed: false - Width: 1200 - X: 120 - Y: 27 + X: 0 + Y: 64 diff --git a/openarm_bimanual_moveit_config/config/moveit_controllers.yaml b/openarm_bimanual_moveit_config/config/moveit_controllers.yaml index 676b2fee..906efad3 100644 --- a/openarm_bimanual_moveit_config/config/moveit_controllers.yaml +++ b/openarm_bimanual_moveit_config/config/moveit_controllers.yaml @@ -1,61 +1,94 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # MoveIt uses this configuration for controller management moveit_controller_manager: moveit_simple_controller_manager/MoveItSimpleControllerManager moveit_simple_controller_manager: controller_names: - - left_arm_controller - - right_arm_controller + - left_joint_trajectory_controller + - right_joint_trajectory_controller - left_gripper_controller - right_gripper_controller + # - left_gripper_controller + # - right_gripper_controller + # - left_side_controller + # - right_side_controller + # - upper_body_controller - left_arm_controller: + left_joint_trajectory_controller: type: FollowJointTrajectory joints: - - left_rev1 - - left_rev2 - - left_rev3 - - left_rev4 - - left_rev5 - - left_rev6 - - left_rev7 + - openarm_left_joint1 + - openarm_left_joint2 + - openarm_left_joint3 + - openarm_left_joint4 + - openarm_left_joint5 + - openarm_left_joint6 + - openarm_left_joint7 action_ns: follow_joint_trajectory default: true - right_arm_controller: + right_joint_trajectory_controller: type: FollowJointTrajectory joints: - - right_rev1 - - right_rev2 - - right_rev3 - - right_rev4 - - right_rev5 - - right_rev6 - - right_rev7 + - openarm_right_joint1 + - openarm_right_joint2 + - openarm_right_joint3 + - openarm_right_joint4 + - openarm_right_joint5 + - openarm_right_joint6 + - openarm_right_joint7 action_ns: follow_joint_trajectory default: true left_gripper_controller: type: GripperCommand joints: - - left_gripper + - openarm_left_finger_joint1 action_ns: gripper_cmd default: true right_gripper_controller: type: GripperCommand joints: - - right_gripper + - openarm_right_finger_joint1 action_ns: gripper_cmd default: true + + # left_side_controller: + # type: FollowJointTrajectory + # joints: + # - openarm_left_joint1 + # - openarm_left_joint2 + # - openarm_left_joint3 + # - openarm_left_joint4 + # - openarm_left_joint5 + # - openarm_left_joint6 + # - openarm_left_joint7 + # - openarm_left_finger_joint1 + # right_side_controller: + # type: FollowJointTrajectory + # joints: + # - openarm_right_joint1 + # - openarm_right_joint2 + # - openarm_right_joint3 + # - openarm_right_joint4 + # - openarm_right_joint5 + # - openarm_right_joint6 + # - openarm_right_joint7 + # - openarm_right_finger_joint1 + # upper_body_controller: + # type: FollowJointTrajectory + # joints: + # - openarm_left_joint1 + # - openarm_left_joint2 + # - openarm_left_joint3 + # - openarm_left_joint4 + # - openarm_left_joint5 + # - openarm_left_joint6 + # - openarm_left_joint7 + # - openarm_left_finger_joint1 + # - openarm_right_joint1 + # - openarm_right_joint2 + # - openarm_right_joint3 + # - openarm_right_joint4 + # - openarm_right_joint5 + # - openarm_right_joint6 + # - openarm_right_joint7 + # - openarm_right_finger_joint1 diff --git a/openarm_bimanual_moveit_config/config/openarm_bimanual.srdf b/openarm_bimanual_moveit_config/config/openarm_bimanual.srdf index e2b3f306..494b9500 100644 --- a/openarm_bimanual_moveit_config/config/openarm_bimanual.srdf +++ b/openarm_bimanual_moveit_config/config/openarm_bimanual.srdf @@ -1,76 +1,37 @@ - - + - - - - - - - - - - - - - - - - - - + + + + + + + - - - - - - - - - - - - - - - - - - + + + + + + + - - + - - + @@ -86,371 +47,203 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - + + - - - - - - - - - - - - - - - - - + + - - - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/openarm_bimanual_moveit_config/config/openarm_bimanual.urdf.xacro b/openarm_bimanual_moveit_config/config/openarm_bimanual.urdf.xacro index c87d7731..4bc9a292 100644 --- a/openarm_bimanual_moveit_config/config/openarm_bimanual.urdf.xacro +++ b/openarm_bimanual_moveit_config/config/openarm_bimanual.urdf.xacro @@ -19,7 +19,7 @@ - + diff --git a/openarm_bimanual_moveit_config/config/pilz_cartesian_limits.yaml b/openarm_bimanual_moveit_config/config/pilz_cartesian_limits.yaml index 38b142a6..b2997caf 100644 --- a/openarm_bimanual_moveit_config/config/pilz_cartesian_limits.yaml +++ b/openarm_bimanual_moveit_config/config/pilz_cartesian_limits.yaml @@ -1,17 +1,3 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # Limits for the Pilz planner cartesian_limits: max_trans_vel: 1.0 diff --git a/openarm_bimanual_moveit_config/config/ros2_controllers.yaml b/openarm_bimanual_moveit_config/config/ros2_controllers.yaml index 3a18e766..d82029f3 100644 --- a/openarm_bimanual_moveit_config/config/ros2_controllers.yaml +++ b/openarm_bimanual_moveit_config/config/ros2_controllers.yaml @@ -1,63 +1,41 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - # This config file is used by ros2_control controller_manager: ros__parameters: - update_rate: 100 # Hz + update_rate: 100 # Hz left_arm_controller: type: joint_trajectory_controller/JointTrajectoryController - right_arm_controller: type: joint_trajectory_controller/JointTrajectoryController - left_gripper_controller: type: position_controllers/GripperActionController - right_gripper_controller: type: position_controllers/GripperActionController + # left_side_controller: + # type: joint_trajectory_controller/JointTrajectoryController - left_side_controller: - type: joint_trajectory_controller/JointTrajectoryController - - - right_side_controller: - type: joint_trajectory_controller/JointTrajectoryController - - - upper_body_controller: - type: joint_trajectory_controller/JointTrajectoryController - + # right_side_controller: + # type: joint_trajectory_controller/JointTrajectoryController + # upper_body_controller: + # type: joint_trajectory_controller/JointTrajectoryController joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster left_arm_controller: ros__parameters: joints: - - left_rev1 - - left_rev2 - - left_rev3 - - left_rev4 - - left_rev5 - - left_rev6 - - left_rev7 + - openarm_left_joint1 + - openarm_left_joint2 + - openarm_left_joint3 + - openarm_left_joint4 + - openarm_left_joint5 + - openarm_left_joint6 + - openarm_left_joint7 command_interfaces: - position - velocity @@ -67,13 +45,13 @@ left_arm_controller: right_arm_controller: ros__parameters: joints: - - right_rev1 - - right_rev2 - - right_rev3 - - right_rev4 - - right_rev5 - - right_rev6 - - right_rev7 + - openarm_right_joint1 + - openarm_right_joint2 + - openarm_right_joint3 + - openarm_right_joint4 + - openarm_right_joint5 + - openarm_right_joint6 + - openarm_right_joint7 command_interfaces: - position - velocity @@ -82,21 +60,102 @@ right_arm_controller: - velocity left_gripper_controller: ros__parameters: - joint: left_gripper + joint: openarm_left_finger_joint1 right_gripper_controller: ros__parameters: - joint: right_gripper + joint: openarm_right_finger_joint1 +# left_side_controller: +# ros__parameters: +# joints: +# - openarm_left_joint1 +# - openarm_left_joint2 +# - openarm_left_joint3 +# - openarm_left_joint4 +# - openarm_left_joint5 +# - openarm_left_joint6 +# - openarm_left_joint7 +# - openarm_left_finger_joint1 +# command_interfaces: +# - position +# - velocity +# state_interfaces: +# - position +# - velocity +# right_side_controller: +# ros__parameters: +# joints: +# - openarm_right_joint1 +# - openarm_right_joint2 +# - openarm_right_joint3 +# - openarm_right_joint4 +# - openarm_right_joint5 +# - openarm_right_joint6 +# - openarm_right_joint7 +# - openarm_right_finger_joint1 +# command_interfaces: +# - position +# - velocity +# state_interfaces: +# - position +# - velocity +# upper_body_controller: +# ros__parameters: +# joints: +# - openarm_left_joint1 +# - openarm_left_joint2 +# - openarm_left_joint3 +# - openarm_left_joint4 +# - openarm_left_joint5 +# - openarm_left_joint6 +# - openarm_left_joint7 +# - openarm_left_finger_joint1 +# - openarm_right_joint1 +# - openarm_right_joint2 +# - openarm_right_joint3 +# - openarm_right_joint4 +# - openarm_right_joint5 +# - openarm_right_joint6 +# - openarm_right_joint7 +# - openarm_right_finger_joint1 +# command_interfaces: +# - position +# - velocity +# state_interfaces: +# - position +# - velocity +# left_gripper_controller: +# ros__parameters: +# joints: +# - openarm_left_finger_joint1 +# command_interfaces: +# - position +# - velocity +# state_interfaces: +# - position +# - velocity +# right_gripper_controller: +# ros__parameters: +# joints: +# - openarm_right_finger_joint1 +# command_interfaces: +# - position +# - velocity +# state_interfaces: +# - position +# - velocity + + joint: openarm_right_finger_joint1 left_side_controller: ros__parameters: joints: - - left_rev1 - - left_rev2 - - left_rev3 - - left_rev4 - - left_rev5 - - left_rev6 - - left_rev7 - - left_gripper + - openarm_left_joint1 + - openarm_left_joint2 + - openarm_left_joint3 + - openarm_left_joint4 + - openarm_left_joint5 + - openarm_left_joint6 + - openarm_left_joint7 + - openarm_left_finger_joint1 command_interfaces: - position - velocity @@ -106,14 +165,14 @@ left_side_controller: right_side_controller: ros__parameters: joints: - - right_rev1 - - right_rev2 - - right_rev3 - - right_rev4 - - right_rev5 - - right_rev6 - - right_rev7 - - right_gripper + - openarm_right_joint1 + - openarm_right_joint2 + - openarm_right_joint3 + - openarm_right_joint4 + - openarm_right_joint5 + - openarm_right_joint6 + - openarm_right_joint7 + - openarm_right_finger_joint1 command_interfaces: - position - velocity @@ -123,25 +182,45 @@ right_side_controller: upper_body_controller: ros__parameters: joints: - - left_rev1 - - left_rev2 - - left_rev3 - - left_rev4 - - left_rev5 - - left_rev6 - - left_rev7 - - left_gripper - - right_rev1 - - right_rev2 - - right_rev3 - - right_rev4 - - right_rev5 - - right_rev6 - - right_rev7 - - right_gripper + - openarm_left_joint1 + - openarm_left_joint2 + - openarm_left_joint3 + - openarm_left_joint4 + - openarm_left_joint5 + - openarm_left_joint6 + - openarm_left_joint7 + - openarm_left_finger_joint1 + - openarm_right_joint1 + - openarm_right_joint2 + - openarm_right_joint3 + - openarm_right_joint4 + - openarm_right_joint5 + - openarm_right_joint6 + - openarm_right_joint7 + - openarm_right_finger_joint1 command_interfaces: - position - velocity state_interfaces: - position - velocity +left_gripper_controller: + ros__parameters: + joints: + - openarm_left_finger_joint1 + command_interfaces: + - position + - velocity + state_interfaces: + - position + - velocity +right_gripper_controller: + ros__parameters: + joints: + - openarm_right_finger_joint1 + command_interfaces: + - position + - velocity + state_interfaces: + - position + - velocity \ No newline at end of file diff --git a/openarm_bimanual_moveit_config/config/sensors_3d.yaml b/openarm_bimanual_moveit_config/config/sensors_3d.yaml index 048fbc54..99dcaeb1 100644 --- a/openarm_bimanual_moveit_config/config/sensors_3d.yaml +++ b/openarm_bimanual_moveit_config/config/sensors_3d.yaml @@ -1,29 +1,17 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - sensors: - default_sensor - kinect_depthimage default_sensor: + far_clipping_plane_distance: 5.0 filtered_cloud_topic: filtered_cloud - max_range: 5.0 + image_topic: /head_mount_kinect/depth_registered/image_raw max_update_rate: 1.0 - padding_offset: 0.1 - padding_scale: 1.0 - point_cloud_topic: /camera/camera/depth/color/points - point_subsample: 1 - sensor_plugin: occupancy_map_monitor/PointCloudOctomapUpdater + near_clipping_plane_distance: 0.3 + padding_offset: 0.03 + padding_scale: 4.0 + queue_size: 5 + sensor_plugin: occupancy_map_monitor/DepthImageOctomapUpdater + shadow_threshold: 0.2 kinect_depthimage: far_clipping_plane_distance: 5.0 filtered_cloud_topic: filtered_cloud @@ -34,4 +22,4 @@ kinect_depthimage: padding_scale: 4.0 queue_size: 5 sensor_plugin: occupancy_map_monitor/DepthImageOctomapUpdater - shadow_threshold: 0.2 + shadow_threshold: 0.2 \ No newline at end of file diff --git a/openarm_bimanual_moveit_config/launch/demo.launch.py b/openarm_bimanual_moveit_config/launch/demo.launch.py index 08d8b800..e75175e5 100644 --- a/openarm_bimanual_moveit_config/launch/demo.launch.py +++ b/openarm_bimanual_moveit_config/launch/demo.launch.py @@ -1,66 +1,254 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from moveit_configs_utils import MoveItConfigsBuilder -from moveit_configs_utils.launches import generate_demo_launch -from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument -from launch.substitutions import LaunchConfiguration, Command, PathJoinSubstitution, FindExecutable +import os +import xacro +from ament_index_python.packages import ( + get_package_share_directory, +) +from launch import LaunchDescription, LaunchContext +from launch.actions import ( + DeclareLaunchArgument, + TimerAction, + OpaqueFunction, +) +from launch.substitutions import ( + LaunchConfiguration, + PathJoinSubstitution, +) +from launch_ros.actions import Node from launch_ros.substitutions import FindPackageShare +from moveit_configs_utils import MoveItConfigsBuilder + + +def generate_robot_description( + context: LaunchContext, + description_package, + description_file, + arm_type, + use_fake_hardware, + use_sim_hardware, + right_can_interface, + left_can_interface, + arm_prefix, +): + """Render Xacro and return XML string.""" + description_package_str = context.perform_substitution(description_package) + description_file_str = context.perform_substitution(description_file) + arm_type_str = context.perform_substitution(arm_type) + use_fake_hardware_str = context.perform_substitution(use_fake_hardware) + use_sim_hardware_str = context.perform_substitution(use_sim_hardware) + right_can_interface_str = context.perform_substitution(right_can_interface) + left_can_interface_str = context.perform_substitution(left_can_interface) + arm_prefix_str = context.perform_substitution(arm_prefix) + + xacro_path = os.path.join( + get_package_share_directory(description_package_str), + "urdf", + "robot", + description_file_str, + ) + + robot_description = xacro.process_file( + xacro_path, + mappings={ + "arm_type": arm_type_str, + "bimanual": "true", + "use_fake_hardware": use_fake_hardware_str, + "use_sim_hardware": use_sim_hardware_str, + "ros2_control": "true", + "left_can_interface": left_can_interface_str, + "right_can_interface": right_can_interface_str, + # arm_prefix unused inside xacro but kept for completeness + }, + ).toprettyxml(indent=" ") + + return robot_description + + +def robot_nodes_spawner( + context: LaunchContext, + description_package, + description_file, + arm_type, + use_fake_hardware, + use_sim_hardware, + controllers_file, + right_can_interface, + left_can_interface, + arm_prefix, +): + robot_description = generate_robot_description( + context, + description_package, + description_file, + arm_type, + use_fake_hardware, + use_sim_hardware, + right_can_interface, + left_can_interface, + arm_prefix, + ) + + controllers_file_str = context.perform_substitution(controllers_file) + robot_description_param = {"robot_description": robot_description} + + robot_state_pub_node = Node( + package="robot_state_publisher", + executable="robot_state_publisher", + name="robot_state_publisher", + output="screen", + parameters=[robot_description_param], + ) + + control_node = Node( + package="controller_manager", + executable="ros2_control_node", + output="both", + parameters=[robot_description_param, controllers_file_str], + ) + + return [robot_state_pub_node, control_node] + + +def controller_spawner(context: LaunchContext, robot_controller): + robot_controller_str = context.perform_substitution(robot_controller) + + if robot_controller_str == "forward_position_controller": + left = "left_forward_position_controller" + right = "right_forward_position_controller" + elif robot_controller_str == "joint_trajectory_controller": + left = "left_joint_trajectory_controller" + right = "right_joint_trajectory_controller" + else: + raise ValueError(f"Unknown robot_controller: {robot_controller_str}") + + return [ + Node( + package="controller_manager", + executable="spawner", + arguments=[left, right, "-c", "/controller_manager"], + ) + ] def generate_launch_description(): - declared_arguments = [] - declared_arguments.append( + declared_arguments = [ DeclareLaunchArgument( - "hardware_type", - default_value="real", - description="Hardware interface type: 'real', 'sim' (MuJoCo), or 'mock'", - ) - ) - declared_arguments.append( + "description_package", + default_value="openarm_description", + ), DeclareLaunchArgument( - "mock_sensor_commands", - default_value="false", - description="Enable writable sensor interfaces when using mock hardware", - ) + "description_file", + default_value="v10.urdf.xacro", + ), + DeclareLaunchArgument("arm_type", default_value="v10"), + DeclareLaunchArgument("use_fake_hardware", default_value="false"), + DeclareLaunchArgument("use_sim_hardware", default_value="false"), + DeclareLaunchArgument( + "robot_controller", + default_value="joint_trajectory_controller", + choices=["forward_position_controller", + "joint_trajectory_controller"], + ), + DeclareLaunchArgument( + "runtime_config_package", default_value="openarm_bringup" + ), + DeclareLaunchArgument("arm_prefix", default_value=""), + DeclareLaunchArgument("right_can_interface", default_value="can0"), + DeclareLaunchArgument("left_can_interface", default_value="can1"), + DeclareLaunchArgument( + "controllers_file", + default_value="openarm_v10_bimanual_controllers.yaml", + ), + ] + + description_package = LaunchConfiguration("description_package") + description_file = LaunchConfiguration("description_file") + arm_type = LaunchConfiguration("arm_type") + use_fake_hardware = LaunchConfiguration("use_fake_hardware") + use_sim_hardware = LaunchConfiguration("use_sim_hardware") + robot_controller = LaunchConfiguration("robot_controller") + runtime_config_package = LaunchConfiguration("runtime_config_package") + controllers_file = LaunchConfiguration("controllers_file") + right_can_interface = LaunchConfiguration("right_can_interface") + left_can_interface = LaunchConfiguration("left_can_interface") + arm_prefix = LaunchConfiguration("arm_prefix") + + controllers_file = PathJoinSubstitution( + [FindPackageShare(runtime_config_package), "config", + "v10_controllers", controllers_file] ) - hardware_type = LaunchConfiguration("hardware_type") - mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") - - moveit_config = ( - MoveItConfigsBuilder("openarm_bimanual", - package_name="openarm_bimanual_moveit_config") - .robot_description( - file_path="config/openarm_bimanual.urdf.xacro", - mappings={ - "hardware_type": hardware_type, - "mock_sensor_commands": mock_sensor_commands, - }, - ) - .to_moveit_configs() + robot_nodes_spawner_func = OpaqueFunction( + function=robot_nodes_spawner, + args=[ + description_package, + description_file, + arm_type, + use_fake_hardware, + use_sim_hardware, + controllers_file, + right_can_interface, + left_can_interface, + arm_prefix, + ], ) - demo_ld = generate_demo_launch(moveit_config) + jsb_spawner = Node( + package="controller_manager", + executable="spawner", + arguments=["joint_state_broadcaster", + "--controller-manager", "/controller_manager"], + ) - ld = LaunchDescription() + controller_spawner_func = OpaqueFunction( + function=controller_spawner, args=[robot_controller]) - for arg in declared_arguments: - ld.add_action(arg) + gripper_spawner = Node( + package="controller_manager", + executable="spawner", + arguments=["left_gripper_controller", + "right_gripper_controller", "-c", "/controller_manager"], + ) + + delayed_jsb = TimerAction(period=2.0, actions=[jsb_spawner]) + delayed_arm_ctrl = TimerAction( + period=1.0, actions=[controller_spawner_func]) + delayed_gripper = TimerAction(period=1.0, actions=[gripper_spawner]) + + moveit_config = MoveItConfigsBuilder( + "openarm", package_name="openarm_bimanual_moveit_config" + ).to_moveit_configs() + + moveit_params = moveit_config.to_dict() + + run_move_group_node = Node( + package="moveit_ros_move_group", + executable="move_group", + output="screen", + parameters=[moveit_params], + ) - for entity in demo_ld.entities: - ld.add_action(entity) + rviz_cfg = os.path.join( + get_package_share_directory( + "openarm_bimanual_moveit_config"), "config", "moveit.rviz" + ) - return ld + rviz_node = Node( + package="rviz2", + executable="rviz2", + name="rviz2", + output="log", + arguments=["-d", rviz_cfg], + parameters=[moveit_params], + ) + + return LaunchDescription( + declared_arguments + + [ + robot_nodes_spawner_func, + delayed_jsb, + delayed_arm_ctrl, + delayed_gripper, + run_move_group_node, + rviz_node, + ] + ) diff --git a/openarm_bimanual_moveit_config/launch/move_group.launch.py b/openarm_bimanual_moveit_config/launch/move_group.launch.py index 1ea72bf4..ec098d29 100644 --- a/openarm_bimanual_moveit_config/launch/move_group.launch.py +++ b/openarm_bimanual_moveit_config/launch/move_group.launch.py @@ -1,23 +1,8 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from moveit_configs_utils import MoveItConfigsBuilder from moveit_configs_utils.launches import generate_move_group_launch def generate_launch_description(): moveit_config = MoveItConfigsBuilder( - "openarm_bimanual", package_name="openarm_bimanual_moveit_config" - ).to_moveit_configs() + "openarm", package_name="openarm_bimanual_moveit_config").to_moveit_configs() return generate_move_group_launch(moveit_config) diff --git a/openarm_bimanual_moveit_config/launch/moveit_rviz.launch.py b/openarm_bimanual_moveit_config/launch/moveit_rviz.launch.py index 6ba122de..1bed84f3 100644 --- a/openarm_bimanual_moveit_config/launch/moveit_rviz.launch.py +++ b/openarm_bimanual_moveit_config/launch/moveit_rviz.launch.py @@ -1,23 +1,8 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from moveit_configs_utils import MoveItConfigsBuilder from moveit_configs_utils.launches import generate_moveit_rviz_launch def generate_launch_description(): moveit_config = MoveItConfigsBuilder( - "openarm_bimanual", package_name="openarm_bimanual_moveit_config" - ).to_moveit_configs() + "openarm", package_name="openarm_bimanual_moveit_config").to_moveit_configs() return generate_moveit_rviz_launch(moveit_config) diff --git a/openarm_bimanual_moveit_config/launch/rsp.launch.py b/openarm_bimanual_moveit_config/launch/rsp.launch.py index 72beea68..4535eee4 100644 --- a/openarm_bimanual_moveit_config/launch/rsp.launch.py +++ b/openarm_bimanual_moveit_config/launch/rsp.launch.py @@ -1,23 +1,8 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from moveit_configs_utils import MoveItConfigsBuilder from moveit_configs_utils.launches import generate_rsp_launch def generate_launch_description(): moveit_config = MoveItConfigsBuilder( - "openarm_bimanual", package_name="openarm_bimanual_moveit_config" - ).to_moveit_configs() + "openarm", package_name="openarm_bimanual_moveit_config").to_moveit_configs() return generate_rsp_launch(moveit_config) diff --git a/openarm_bimanual_moveit_config/launch/setup_assistant.launch.py b/openarm_bimanual_moveit_config/launch/setup_assistant.launch.py index fc158b42..fbc2c527 100644 --- a/openarm_bimanual_moveit_config/launch/setup_assistant.launch.py +++ b/openarm_bimanual_moveit_config/launch/setup_assistant.launch.py @@ -1,23 +1,8 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from moveit_configs_utils import MoveItConfigsBuilder from moveit_configs_utils.launches import generate_setup_assistant_launch def generate_launch_description(): moveit_config = MoveItConfigsBuilder( - "openarm_bimanual", package_name="openarm_bimanual_moveit_config" - ).to_moveit_configs() + "openarm", package_name="openarm_bimanual_moveit_config").to_moveit_configs() return generate_setup_assistant_launch(moveit_config) diff --git a/openarm_bimanual_moveit_config/launch/spawn_controllers.launch.py b/openarm_bimanual_moveit_config/launch/spawn_controllers.launch.py index 95c7565d..d5ecc3c4 100644 --- a/openarm_bimanual_moveit_config/launch/spawn_controllers.launch.py +++ b/openarm_bimanual_moveit_config/launch/spawn_controllers.launch.py @@ -1,23 +1,8 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - from moveit_configs_utils import MoveItConfigsBuilder from moveit_configs_utils.launches import generate_spawn_controllers_launch def generate_launch_description(): moveit_config = MoveItConfigsBuilder( - "openarm_bimanual", package_name="openarm_bimanual_moveit_config" - ).to_moveit_configs() + "openarm", package_name="openarm_bimanual_moveit_config").to_moveit_configs() return generate_spawn_controllers_launch(moveit_config) diff --git a/openarm_bimanual_moveit_config/launch/static_virtual_joint_tfs.launch.py b/openarm_bimanual_moveit_config/launch/static_virtual_joint_tfs.launch.py index 6cfa2e7f..9b82fdc7 100644 --- a/openarm_bimanual_moveit_config/launch/static_virtual_joint_tfs.launch.py +++ b/openarm_bimanual_moveit_config/launch/static_virtual_joint_tfs.launch.py @@ -1,23 +1,8 @@ -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - 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( - "openarm_bimanual", package_name="openarm_bimanual_moveit_config" - ).to_moveit_configs() + "openarm", package_name="openarm_bimanual_moveit_config").to_moveit_configs() return generate_static_virtual_joint_tfs_launch(moveit_config) diff --git a/openarm_bimanual_moveit_config/package.xml b/openarm_bimanual_moveit_config/package.xml index f4b49c3c..762a9eb8 100644 --- a/openarm_bimanual_moveit_config/package.xml +++ b/openarm_bimanual_moveit_config/package.xml @@ -1,29 +1,14 @@ - openarm_bimanual_moveit_config 0.3.0 - An automatically generated package with all the configuration and launch files for using the openarm_bimanual with the MoveIt Motion Planning Framework + An automatically generated package with all the configuration and launch files for using the openarm with the MoveIt Motion Planning Framework Thomason Zhou - Apache-2.0 + BSD http://moveit.ros.org/ https://github.com/ros-planning/moveit2/issues @@ -49,16 +34,14 @@ moveit_configs_utils moveit_ros_move_group moveit_ros_visualization - moveit_ros_perception moveit_setup_assistant - openarm_bimanual_description + openarm_description robot_state_publisher - ros2_control - ros2_controllers rviz2 rviz_common rviz_default_plugins tf2_ros + xacro diff --git a/openarm_bringup/CMakeLists.txt b/openarm_bringup/CMakeLists.txt index 22ca5a1d..72ac5c04 100644 --- a/openarm_bringup/CMakeLists.txt +++ b/openarm_bringup/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright 2025 Reazon Holdings, Inc. +# Copyright 2025 Enactic, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/openarm_bringup/README.md b/openarm_bringup/README.md index 720ca897..391f8f7d 100644 --- a/openarm_bringup/README.md +++ b/openarm_bringup/README.md @@ -1,9 +1,32 @@ -## utils +# OpenArm Bringup -init_can.sh \ \ +This package provides launch files to bring up the OpenArm robot system. -e.g. -```sh -./init_can.sh/dev/ACM0 can0 -./init_can.sh/dev/ACM1 can1 +## Quick Start + +Launch the OpenArm with v1.0 configuration and fake hardware: + +```bash +ros2 launch openarm_bringup openarm.launch.py arm_type:=v10 use_fake_hardware:=true ``` + +## Launch Files + +- `openarm.launch.py` - Single arm configuration +- `openarm.bimanual.launch.py` - Dual arm configuration + +## Key Parameters + +- `arm_type` - Arm type (default: v10) +- `use_fake_hardware` - Use fake hardware instead of real hardware (default: false) +- `can_interface` - CAN interface to use (default: can0) +- `robot_controller` - Controller type: `joint_trajectory_controller` or `forward_position_controller` + +## What Gets Launched + +- Robot state publisher +- Controller manager with ros2_control +- Joint state broadcaster +- Robot controller (joint trajectory or forward position) +- Gripper controller +- RViz2 visualization diff --git a/openarm_bringup/config/test_goal_publishers_config.yaml b/openarm_bringup/config/test_goal_publishers_config.yaml deleted file mode 100644 index f750f348..00000000 --- a/openarm_bringup/config/test_goal_publishers_config.yaml +++ /dev/null @@ -1,58 +0,0 @@ -# Copyright (c) 2024 Stogl Robotics Consulting UG (haftungsbeschränkt) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# -# Source of this file are templates in -# [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository. -# - -publisher_forward_position_controller: - ros__parameters: - - controller_name: "forward_position_controller" - wait_sec_between_publish: 5 - - goal_names: ["pos1", "pos2", "pos3", "pos4"] - pos1: [0.185, 0.185, 0.185, 0.185, 0.185, 0.185, 0.185] - pos2: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] - pos3: [-0.185, -0.185, -0.185, -0.185, -0.185, -0.185, -0.185] - pos4: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] - - -publisher_joint_trajectory_controller: - ros__parameters: - - controller_name: "joint_trajectory_controller" - wait_sec_between_publish: 6 - repeat_the_same_goal: 1 # useful to simulate continuous inputs - - goal_time_from_start: 3.0 - goal_names: ["pos1", "pos2", "pos3", "pos4"] - pos1: - positions: [0.185, 0.185, 0.185, 0.185, 0.185, 0.185, 0.185] - pos2: - positions: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] - pos3: - positions: [-0.185, -0.185, -0.185, -0.185, -0.185, -0.185, -0.185] - pos4: - positions: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] - - joints: - - rev1 - - rev2 - - rev3 - - rev4 - - rev5 - - rev6 - - rev7 diff --git a/openarm_bringup/config/v10_controllers/openarm_v10_bimanual_controllers.yaml b/openarm_bringup/config/v10_controllers/openarm_v10_bimanual_controllers.yaml new file mode 100644 index 00000000..8a386eec --- /dev/null +++ b/openarm_bringup/config/v10_controllers/openarm_v10_bimanual_controllers.yaml @@ -0,0 +1,175 @@ +# Copyright 2025 Enactic, Inc. +# Copyright 2024 Stogl Robotics Consulting UG (haftungsbeschränkt) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +controller_manager: + ros__parameters: + update_rate: 100 # Hz + + joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + + left_forward_position_controller: + type: forward_command_controller/ForwardCommandController + + left_forward_velocity_controller: + type: forward_command_controller/ForwardCommandController + + left_joint_trajectory_controller: + type: joint_trajectory_controller/JointTrajectoryController + + left_gripper_controller: + type: position_controllers/GripperActionController + + right_forward_position_controller: + type: forward_command_controller/ForwardCommandController + + right_forward_velocity_controller: + type: forward_command_controller/ForwardCommandController + + right_joint_trajectory_controller: + type: joint_trajectory_controller/JointTrajectoryController + + right_gripper_controller: + type: position_controllers/GripperActionController + + +left_forward_position_controller: + ros__parameters: + joints: + - openarm_left_joint1 + - openarm_left_joint2 + - openarm_left_joint3 + - openarm_left_joint4 + - openarm_left_joint5 + - openarm_left_joint6 + - openarm_left_joint7 + interface_name: position + command_interfaces: + - position + state_interfaces: + - position + +left_forward_velocity_controller: + ros__parameters: + joints: + - openarm_left_joint1 + - openarm_left_joint2 + - openarm_left_joint3 + - openarm_left_joint4 + - openarm_left_joint5 + - openarm_left_joint6 + - openarm_left_joint7 + interface_name: velocity + command_interfaces: + - velocity + state_interfaces: + - velocity + +left_joint_trajectory_controller: + ros__parameters: + joints: + - openarm_left_joint1 + - openarm_left_joint2 + - openarm_left_joint3 + - openarm_left_joint4 + - openarm_left_joint5 + - openarm_left_joint6 + - openarm_left_joint7 + interface_name: position + command_interfaces: + - position + state_interfaces: + - position + + state_publish_rate: 50.0 # Defaults to 50 + action_monitor_rate: 50.0 # Defaults to 20 + + allow_partial_joints_goal: false # Defaults to false + constraints: + stopped_velocity_tolerance: 0.01 # Defaults to 0.01 + goal_time: 0.0 # Defaults to 0.0 (start immediately) + +left_gripper_controller: + ros__parameters: + joint: openarm_left_finger_joint1 + command_interfaces: + - position + state_interfaces: + - position + + +right_forward_position_controller: + ros__parameters: + joints: + - openarm_right_joint1 + - openarm_right_joint2 + - openarm_right_joint3 + - openarm_right_joint4 + - openarm_right_joint5 + - openarm_right_joint6 + - openarm_right_joint7 + interface_name: position + command_interfaces: + - position + state_interfaces: + - position + +right_forward_velocity_controller: + ros__parameters: + joints: + - openarm_right_joint1 + - openarm_right_joint2 + - openarm_right_joint3 + - openarm_right_joint4 + - openarm_right_joint5 + - openarm_right_joint6 + - openarm_right_joint7 + interface_name: velocity + command_interfaces: + - velocity + state_interfaces: + - velocity + +right_joint_trajectory_controller: + ros__parameters: + joints: + - openarm_right_joint1 + - openarm_right_joint2 + - openarm_right_joint3 + - openarm_right_joint4 + - openarm_right_joint5 + - openarm_right_joint6 + - openarm_right_joint7 + interface_name: position + command_interfaces: + - position + state_interfaces: + - position + + state_publish_rate: 50.0 # Defaults to 50 + action_monitor_rate: 50.0 # Defaults to 20 + + allow_partial_joints_goal: false # Defaults to false + constraints: + stopped_velocity_tolerance: 0.01 # Defaults to 0.01 + goal_time: 0.0 # Defaults to 0.0 (start immediately) + +right_gripper_controller: + ros__parameters: + joint: openarm_right_finger_joint1 + command_interfaces: + - position + state_interfaces: + - position \ No newline at end of file diff --git a/openarm_bringup/config/v10_controllers/openarm_v10_bimanual_controllers_wildcard.yaml b/openarm_bringup/config/v10_controllers/openarm_v10_bimanual_controllers_wildcard.yaml new file mode 100644 index 00000000..6892eba3 --- /dev/null +++ b/openarm_bringup/config/v10_controllers/openarm_v10_bimanual_controllers_wildcard.yaml @@ -0,0 +1,124 @@ +/**: + ros__parameters: + update_rate: 100 # Hz + + joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + + left_joint_trajectory_controller: + type: joint_trajectory_controller/JointTrajectoryController + + right_joint_trajectory_controller: + type: joint_trajectory_controller/JointTrajectoryController + + left_forward_position_controller: + type: forward_command_controller/ForwardCommandController + + right_forward_position_controller: + type: forward_command_controller/ForwardCommandController + + left_gripper_controller: + type: forward_command_controller/ForwardCommandController + + right_gripper_controller: + type: forward_command_controller/ForwardCommandController + +/**/left_joint_trajectory_controller: + ros__parameters: + joints: + - openarm_left_joint1 + - openarm_left_joint2 + - openarm_left_joint3 + - openarm_left_joint4 + - openarm_left_joint5 + - openarm_left_joint6 + - openarm_left_joint7 + interface_name: position + command_interfaces: + - position + state_interfaces: + - position + - velocity + state_publish_rate: 100.0 + action_monitor_rate: 20.0 + allow_partial_joints_goal: false + open_loop_control: false + allow_integration_in_goal_trajectories: true + constraints: + stopped_velocity_tolerance: 0.01 + goal_time: 0.6 + openarm_left_joint1: {trajectory: 0.1, goal: 0.1} + openarm_left_joint2: {trajectory: 0.1, goal: 0.1} + openarm_left_joint3: {trajectory: 0.1, goal: 0.1} + openarm_left_joint4: {trajectory: 0.1, goal: 0.1} + openarm_left_joint5: {trajectory: 0.1, goal: 0.1} + openarm_left_joint6: {trajectory: 0.1, goal: 0.1} + openarm_left_joint7: {trajectory: 0.1, goal: 0.1} + +/**/right_joint_trajectory_controller: + ros__parameters: + joints: + - openarm_right_joint1 + - openarm_right_joint2 + - openarm_right_joint3 + - openarm_right_joint4 + - openarm_right_joint5 + - openarm_right_joint6 + - openarm_right_joint7 + interface_name: position + command_interfaces: + - position + state_interfaces: + - position + - velocity + state_publish_rate: 100.0 + action_monitor_rate: 20.0 + allow_partial_joints_goal: false + open_loop_control: false + allow_integration_in_goal_trajectories: true + constraints: + stopped_velocity_tolerance: 0.01 + goal_time: 0.6 + openarm_right_joint1: {trajectory: 0.1, goal: 0.1} + openarm_right_joint2: {trajectory: 0.1, goal: 0.1} + openarm_right_joint3: {trajectory: 0.1, goal: 0.1} + openarm_right_joint4: {trajectory: 0.1, goal: 0.1} + openarm_right_joint5: {trajectory: 0.1, goal: 0.1} + openarm_right_joint6: {trajectory: 0.1, goal: 0.1} + openarm_right_joint7: {trajectory: 0.1, goal: 0.1} + +/**/left_forward_position_controller: + ros__parameters: + joints: + - openarm_left_joint1 + - openarm_left_joint2 + - openarm_left_joint3 + - openarm_left_joint4 + - openarm_left_joint5 + - openarm_left_joint6 + - openarm_left_joint7 + interface_name: position + +/**/right_forward_position_controller: + ros__parameters: + joints: + - openarm_right_joint1 + - openarm_right_joint2 + - openarm_right_joint3 + - openarm_right_joint4 + - openarm_right_joint5 + - openarm_right_joint6 + - openarm_right_joint7 + interface_name: position + +/**/left_gripper_controller: + ros__parameters: + joints: + - openarm_left_finger_joint1 + interface_name: position + +/**/right_gripper_controller: + ros__parameters: + joints: + - openarm_right_finger_joint1 + interface_name: position diff --git a/openarm_bringup/config/openarm_controllers.yaml b/openarm_bringup/config/v10_controllers/openarm_v10_controllers.yaml similarity index 54% rename from openarm_bringup/config/openarm_controllers.yaml rename to openarm_bringup/config/v10_controllers/openarm_v10_controllers.yaml index 5f172e01..f2f3a03c 100644 --- a/openarm_bringup/config/openarm_controllers.yaml +++ b/openarm_bringup/config/v10_controllers/openarm_v10_controllers.yaml @@ -1,4 +1,5 @@ -# Copyright (c) 2024 Stogl Robotics Consulting UG (haftungsbeschränkt) +# Copyright 2025 Enactic, Inc. +# Copyright 2024 Stogl Robotics Consulting UG (haftungsbeschränkt) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -12,13 +13,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -# -# Source of this file are templates in -# [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository. -# -# Author: Dr. Denis -# - controller_manager: ros__parameters: update_rate: 100 # Hz @@ -26,49 +20,61 @@ controller_manager: joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - forward_position_controller: + forward_position_controller: type: forward_command_controller/ForwardCommandController - forward_velocity_controller: + forward_velocity_controller: type: forward_command_controller/ForwardCommandController - joint_trajectory_controller: + joint_trajectory_controller: type: joint_trajectory_controller/JointTrajectoryController -forward_position_controller: + gripper_controller: + type: position_controllers/GripperActionController + +forward_position_controller: ros__parameters: joints: - - rev1 - - rev2 - - rev3 - - rev4 - - rev5 - - rev6 - - rev7 + - openarm_joint1 + - openarm_joint2 + - openarm_joint3 + - openarm_joint4 + - openarm_joint5 + - openarm_joint6 + - openarm_joint7 interface_name: position + command_interfaces: + - position + state_interfaces: + - position -forward_velocity_controller: + +forward_velocity_controller: ros__parameters: joints: - - rev1 - - rev2 - - rev3 - - rev4 - - rev5 - - rev6 - - rev7 + - openarm_joint1 + - openarm_joint2 + - openarm_joint3 + - openarm_joint4 + - openarm_joint5 + - openarm_joint6 + - openarm_joint7 interface_name: velocity + command_interfaces: + - velocity + state_interfaces: + - velocity -joint_trajectory_controller: +joint_trajectory_controller: ros__parameters: joints: - - rev1 - - rev2 - - rev3 - - rev4 - - rev5 - - rev6 - - rev7 + - openarm_joint1 + - openarm_joint2 + - openarm_joint3 + - openarm_joint4 + - openarm_joint5 + - openarm_joint6 + - openarm_joint7 command_interfaces: - position @@ -82,3 +88,12 @@ joint_trajectory_controller: constraints: stopped_velocity_tolerance: 0.01 # Defaults to 0.01 goal_time: 0.0 # Defaults to 0.0 (start immediately) + + +gripper_controller: + ros__parameters: + joint: openarm_finger_joint1 + command_interfaces: + - position + state_interfaces: + - position \ No newline at end of file diff --git a/openarm_bringup/launch/openarm.bimanual.launch.py b/openarm_bringup/launch/openarm.bimanual.launch.py new file mode 100644 index 00000000..99250a5c --- /dev/null +++ b/openarm_bringup/launch/openarm.bimanual.launch.py @@ -0,0 +1,285 @@ +# Copyright 2025 Enactic, Inc. +# Copyright 2024 Stogl Robotics Consulting UG (haftungsbeschränkt) +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os +import xacro + +from ament_index_python.packages import get_package_share_directory + +from launch import LaunchDescription, LaunchContext +from launch.actions import DeclareLaunchArgument, RegisterEventHandler, TimerAction, OpaqueFunction +from launch.event_handlers import OnProcessExit +from launch.substitutions import ( + LaunchConfiguration, + PathJoinSubstitution, +) +from launch_ros.actions import Node +from launch_ros.substitutions import FindPackageShare + + +def namespace_from_context(context, arm_prefix): + arm_prefix_str = context.perform_substitution(arm_prefix) + if arm_prefix_str: + return arm_prefix_str.strip('/') + return None + + +def generate_robot_description(context: LaunchContext, description_package, description_file, + arm_type, use_fake_hardware, right_can_interface, left_can_interface): + """Generate robot description using xacro processing.""" + + description_package_str = context.perform_substitution(description_package) + description_file_str = context.perform_substitution(description_file) + arm_type_str = context.perform_substitution(arm_type) + use_fake_hardware_str = context.perform_substitution(use_fake_hardware) + right_can_interface_str = context.perform_substitution(right_can_interface) + left_can_interface_str = context.perform_substitution(left_can_interface) + + xacro_path = os.path.join( + get_package_share_directory(description_package_str), + "urdf", "robot", description_file_str + ) + + # Process xacro with required arguments + robot_description = xacro.process_file( + xacro_path, + mappings={ + "arm_type": arm_type_str, + "bimanual": "true", + "use_fake_hardware": use_fake_hardware_str, + "ros2_control": "true", + "right_can_interface": right_can_interface_str, + "left_can_interface": left_can_interface_str, + } + ).toprettyxml(indent=" ") + + return robot_description + + +def robot_nodes_spawner(context: LaunchContext, description_package, description_file, + arm_type, use_fake_hardware, controllers_file, right_can_interface, left_can_interface, arm_prefix): + """Spawn both robot state publisher and control nodes with shared robot description.""" + namespace = namespace_from_context(context, arm_prefix) + + robot_description = generate_robot_description( + context, description_package, description_file, arm_type, use_fake_hardware, right_can_interface, left_can_interface, + ) + + controllers_file_str = context.perform_substitution(controllers_file) + robot_description_param = {"robot_description": robot_description} + + if namespace: + controllers_file_str = controllers_file_str.replace( + "openarm_v10_bimanual_controllers.yaml", "openarm_v10_bimanual_controllers_namespaced.yaml" + ) + robot_state_pub_node = Node( + package="robot_state_publisher", + executable="robot_state_publisher", + name="robot_state_publisher", + output="screen", + namespace=namespace, + parameters=[robot_description_param], + ) + + control_node = Node( + package="controller_manager", + executable="ros2_control_node", + output="both", + namespace=namespace, + parameters=[robot_description_param, controllers_file_str], + ) + + return [robot_state_pub_node, control_node] + + +def controller_spawner(context: LaunchContext, robot_controller, arm_prefix): + """Spawn controller based on robot_controller argument.""" + namespace = namespace_from_context(context, arm_prefix) + + controller_manager_ref = f"/{namespace}/controller_manager" if namespace else "/controller_manager" + + robot_controller_str = context.perform_substitution(robot_controller) + + if robot_controller_str == "forward_position_controller": + robot_controller_left = "left_forward_position_controller" + robot_controller_right = "right_forward_position_controller" + elif robot_controller_str == "joint_trajectory_controller": + robot_controller_left = "left_joint_trajectory_controller" + robot_controller_right = "right_joint_trajectory_controller" + else: + raise ValueError(f"Unknown robot_controller: {robot_controller_str}") + + robot_controller_spawner = Node( + package="controller_manager", + executable="spawner", + namespace=namespace, + arguments=[robot_controller_left, + robot_controller_right, "-c", controller_manager_ref], + ) + + return [robot_controller_spawner] + + +def generate_launch_description(): + """Generate launch description for OpenArm bimanual configuration.""" + + # Declare launch arguments + declared_arguments = [ + DeclareLaunchArgument( + "description_package", + default_value="openarm_description", + description="Description package with robot URDF/xacro files.", + ), + DeclareLaunchArgument( + "description_file", + default_value="v10.urdf.xacro", + description="URDF/XACRO description file with the robot.", + ), + DeclareLaunchArgument( + "arm_type", + default_value="v10", + description="Type of arm (e.g., v10).", + ), + DeclareLaunchArgument( + "use_fake_hardware", + default_value="false", + description="Use fake hardware instead of real hardware.", + ), + DeclareLaunchArgument( + "robot_controller", + default_value="joint_trajectory_controller", + choices=["forward_position_controller", + "joint_trajectory_controller"], + description="Robot controller to start.", + ), + DeclareLaunchArgument( + "runtime_config_package", + default_value="openarm_bringup", + description="Package with the controller's configuration in config folder.", + ), + DeclareLaunchArgument( + "arm_prefix", + default_value="", + description="Prefix for the arm for topic namespacing.", + ), + DeclareLaunchArgument( + "right_can_interface", + default_value="can0", + description="CAN interface to use for the right arm.", + ), + DeclareLaunchArgument( + "left_can_interface", + default_value="can1", + description="CAN interface to use for the left arm.", + ), + DeclareLaunchArgument( + "controllers_file", + default_value="openarm_v10_bimanual_controllers.yaml", + description="Controllers file(s) to use. Can be a single file or comma-separated list of files.", + ), + ] + + # Initialize launch configurations + description_package = LaunchConfiguration("description_package") + description_file = LaunchConfiguration("description_file") + arm_type = LaunchConfiguration("arm_type") + use_fake_hardware = LaunchConfiguration("use_fake_hardware") + robot_controller = LaunchConfiguration("robot_controller") + runtime_config_package = LaunchConfiguration("runtime_config_package") + controllers_file = LaunchConfiguration("controllers_file") + rightcan_interface = LaunchConfiguration("right_can_interface") + left_can_interface = LaunchConfiguration("left_can_interface") + arm_prefix = LaunchConfiguration("arm_prefix") + + controllers_file = PathJoinSubstitution( + [FindPackageShare(runtime_config_package), "config", + "v10_controllers", controllers_file] + ) + + robot_nodes_spawner_func = OpaqueFunction( + function=robot_nodes_spawner, + args=[description_package, description_file, arm_type, + use_fake_hardware, controllers_file, rightcan_interface, left_can_interface, arm_prefix] + ) + + rviz_config_file = PathJoinSubstitution( + [FindPackageShare(description_package), "rviz", + "bimanual.rviz"] + ) + + rviz_node = Node( + package="rviz2", + executable="rviz2", + name="rviz2", + output="log", + arguments=["-d", rviz_config_file], + ) + + # Joint state broadcaster spawner + joint_state_broadcaster_spawner = OpaqueFunction( + function=lambda context: [Node( + package="controller_manager", + executable="spawner", + namespace=namespace_from_context(context, arm_prefix), + arguments=["joint_state_broadcaster", + "--controller-manager", + f"/{namespace_from_context(context, arm_prefix)}/controller_manager" if namespace_from_context(context, arm_prefix) else "/controller_manager"], + )] + ) + + # Controller spawners + controller_spawner_func = OpaqueFunction( + function=controller_spawner, + args=[robot_controller, arm_prefix] + ) + + gripper_controller_spawner = OpaqueFunction( + function=lambda context: [Node( + package="controller_manager", + executable="spawner", + namespace=namespace_from_context(context, arm_prefix), + arguments=["left_gripper_controller", + "right_gripper_controller", "-c", + f"/{namespace_from_context(context, arm_prefix)}/controller_manager" if namespace_from_context(context, arm_prefix) else "/controller_manager"], + )] + ) + + # Timing and sequencing + LAUNCH_DELAY_SECONDS = 1.0 + delayed_joint_state_broadcaster = TimerAction( + period=LAUNCH_DELAY_SECONDS, + actions=[joint_state_broadcaster_spawner], + ) + + delayed_robot_controller = TimerAction( + period=LAUNCH_DELAY_SECONDS, + actions=[controller_spawner_func], + ) + delayed_gripper_controller = TimerAction( + period=LAUNCH_DELAY_SECONDS, + actions=[gripper_controller_spawner], + ) + + return LaunchDescription( + declared_arguments + [ + robot_nodes_spawner_func, + rviz_node, + ] + + [ + delayed_joint_state_broadcaster, + delayed_robot_controller, + delayed_gripper_controller, + ] + ) diff --git a/openarm_bringup/launch/openarm.launch.py b/openarm_bringup/launch/openarm.launch.py index 3a20d096..1c7a8b44 100644 --- a/openarm_bringup/launch/openarm.launch.py +++ b/openarm_bringup/launch/openarm.launch.py @@ -1,4 +1,4 @@ -# Copyright 2025 Reazon Holdings, Inc. +# Copyright 2025 Enactic, Inc. # Copyright 2024 Stogl Robotics Consulting UG (haftungsbeschränkt) # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -13,19 +13,15 @@ # See the License for the specific language governing permissions and # limitations under the License. -# -# Source of this file are templates in -# [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository. -# -# Author: Dr. Denis -# +import os +import xacro -from launch import LaunchDescription -from launch.actions import DeclareLaunchArgument, RegisterEventHandler, TimerAction -from launch.event_handlers import OnProcessExit, OnProcessStart +from ament_index_python.packages import get_package_share_directory + +from launch import LaunchDescription, LaunchContext +from launch.actions import DeclareLaunchArgument, RegisterEventHandler, TimerAction, OpaqueFunction +from launch.event_handlers import OnProcessExit from launch.substitutions import ( - Command, - FindExecutable, LaunchConfiguration, PathJoinSubstitution, ) @@ -33,126 +29,155 @@ from launch_ros.substitutions import FindPackageShare -def generate_launch_description(): - # Declare arguments - declared_arguments = [] - declared_arguments.append( - DeclareLaunchArgument( - "runtime_config_package", - default_value="openarm_bringup", - description='Package with the controller\'s configuration in "config" folder. \ - Usually the argument is not set, it enables use of a custom setup.', - ) +def generate_robot_description(context: LaunchContext, description_package, description_file, + arm_type, use_fake_hardware, can_interface, arm_prefix): + """Generate robot description using xacro processing.""" + + # Substitute launch configuration values + description_package_str = context.perform_substitution(description_package) + description_file_str = context.perform_substitution(description_file) + arm_type_str = context.perform_substitution(arm_type) + use_fake_hardware_str = context.perform_substitution(use_fake_hardware) + can_interface_str = context.perform_substitution(can_interface) + arm_prefix_str = context.perform_substitution(arm_prefix) + + # Build xacro file path + xacro_path = os.path.join( + get_package_share_directory(description_package_str), + "urdf", "robot", description_file_str ) - declared_arguments.append( - DeclareLaunchArgument( - "controllers_file", - default_value="openarm_controllers.yaml", - description="YAML file with the controllers configuration.", - ) + + # Process xacro with required arguments + robot_description = xacro.process_file( + xacro_path, + mappings={ + "arm_type": arm_type_str, + "bimanual": "false", + "use_fake_hardware": use_fake_hardware_str, + "ros2_control": "true", + "can_interface": can_interface_str, + "arm_prefix": arm_prefix_str, + } + ).toprettyxml(indent=" ") + + return robot_description + + +def robot_nodes_spawner(context: LaunchContext, description_package, description_file, + arm_type, use_fake_hardware, controllers_file, can_interface, arm_prefix): + """Spawn both robot state publisher and control nodes with shared robot description.""" + + # Generate robot description once + robot_description = generate_robot_description( + context, description_package, description_file, arm_type, use_fake_hardware, can_interface, arm_prefix + ) + + # Get controllers file path + controllers_file_str = context.perform_substitution(controllers_file) + robot_description_param = {"robot_description": robot_description} + + # Robot state publisher node + robot_state_pub_node = Node( + package="robot_state_publisher", + executable="robot_state_publisher", + name="robot_state_publisher", + output="screen", + parameters=[robot_description_param], + ) + + # Control node + control_node = Node( + package="controller_manager", + executable="ros2_control_node", + output="both", + parameters=[robot_description_param, controllers_file_str], ) - declared_arguments.append( + + return [robot_state_pub_node, control_node] + + +def generate_launch_description(): + """Generate launch description for OpenArm unimanual configuration.""" + + # Declare launch arguments + declared_arguments = [ DeclareLaunchArgument( "description_package", default_value="openarm_description", - description="Description package with robot URDF/xacro files. Usually the argument \ - is not set, it enables use of a custom description.", - ) - ) - declared_arguments.append( + description="Description package with robot URDF/xacro files.", + ), DeclareLaunchArgument( "description_file", - default_value="openarm.urdf.xacro", + default_value="v10.urdf.xacro", description="URDF/XACRO description file with the robot.", - ) - ) - declared_arguments.append( + ), DeclareLaunchArgument( - "prefix", - default_value='""', - description="Prefix of the joint names, useful for \ - multi-robot setup. If changed than also joint names in the controllers' configuration \ - have to be updated.", - ) - ) - declared_arguments.append( + "arm_type", + default_value="v10", + description="Type of arm (e.g., v10).", + ), DeclareLaunchArgument( - "hardware_type", - default_value="real", - description="Hardware interface type: 'real', 'sim' (MuJoCo), or 'mock'", - ) - ) - declared_arguments.append( - DeclareLaunchArgument( - "mock_sensor_commands", + "use_fake_hardware", default_value="false", - description="Enable mock command interfaces for sensors used for simple simulations. \ - Used only if 'hardware_type' parameter is 'mock'.", - ) - ) - declared_arguments.append( + description="Use fake hardware instead of real hardware.", + ), DeclareLaunchArgument( "robot_controller", default_value="joint_trajectory_controller", choices=["forward_position_controller", "joint_trajectory_controller"], description="Robot controller to start.", - ) - ) + ), + DeclareLaunchArgument( + "runtime_config_package", + default_value="openarm_bringup", + description="Package with the controller's configuration in config folder.", + ), + DeclareLaunchArgument( + "arm_prefix", + default_value="", + description="Prefix for the arm.", + ), + DeclareLaunchArgument( + "can_interface", + default_value="can0", + description="CAN interface to use.", + ), + DeclareLaunchArgument( + "controllers_file", + default_value="openarm_v10_controllers.yaml", + description="Controllers file(s) to use. Can be a single file or comma-separated list of files.", + ), + ] - # Initialize Arguments - runtime_config_package = LaunchConfiguration("runtime_config_package") - controllers_file = LaunchConfiguration("controllers_file") + # Initialize launch configurations description_package = LaunchConfiguration("description_package") description_file = LaunchConfiguration("description_file") - prefix = LaunchConfiguration("prefix") - hardware_type = LaunchConfiguration("hardware_type") - mock_sensor_commands = LaunchConfiguration("mock_sensor_commands") + arm_type = LaunchConfiguration("arm_type") + use_fake_hardware = LaunchConfiguration("use_fake_hardware") robot_controller = LaunchConfiguration("robot_controller") - - # Get URDF via xacro - robot_description_content = Command( - [ - PathJoinSubstitution([FindExecutable(name="xacro")]), - " ", - PathJoinSubstitution( - [FindPackageShare(description_package), - "urdf", description_file] - ), - " ", - "prefix:=", - prefix, - " ", - "hardware_type:=", - hardware_type, - " ", - "mock_sensor_commands:=", - mock_sensor_commands, - " ", - ] + runtime_config_package = LaunchConfiguration("runtime_config_package") + controllers_file = LaunchConfiguration("controllers_file") + can_interface = LaunchConfiguration("can_interface") + arm_prefix = LaunchConfiguration("arm_prefix") + # Configuration file paths + controllers_file = PathJoinSubstitution( + [FindPackageShare(runtime_config_package), "config", + "v10_controllers", controllers_file] ) - robot_description = {"robot_description": robot_description_content} - - robot_controllers = PathJoinSubstitution( - [FindPackageShare(runtime_config_package), "config", controllers_file] + # Robot nodes spawner (both state publisher and control) + robot_nodes_spawner_func = OpaqueFunction( + function=robot_nodes_spawner, + args=[description_package, description_file, arm_type, + use_fake_hardware, controllers_file, can_interface, arm_prefix] ) + # RViz configuration rviz_config_file = PathJoinSubstitution( - [FindPackageShare(description_package), "rviz", "openarm.rviz"] + [FindPackageShare(description_package), "rviz", + "robot_description.rviz"] ) - control_node = Node( - package="controller_manager", - executable="ros2_control_node", - output="both", - parameters=[robot_description, robot_controllers], - ) - robot_state_pub_node = Node( - package="robot_state_publisher", - executable="robot_state_publisher", - output="both", - parameters=[robot_description], - ) rviz_node = Node( package="rviz2", executable="rviz2", @@ -161,94 +186,50 @@ def generate_launch_description(): arguments=["-d", rviz_config_file], ) + # Joint state broadcaster spawner joint_state_broadcaster_spawner = Node( package="controller_manager", executable="spawner", - arguments=[ - "joint_state_broadcaster", - "--controller-manager", - "/controller_manager", - ], + arguments=["joint_state_broadcaster", + "--controller-manager", "/controller_manager"], ) - robot_controller_names = [robot_controller] - robot_controller_spawners = [] - for controller in robot_controller_names: - robot_controller_spawners += [ - Node( - package="controller_manager", - executable="spawner", - arguments=[controller, "-c", "/controller_manager"], - ) - ] - - inactive_robot_controller_names = [] - inactive_robot_controller_spawners = [] - for controller in inactive_robot_controller_names: - inactive_robot_controller_spawners += [ - Node( - package="controller_manager", - executable="spawner", - arguments=[controller, "-c", - "/controller_manager", "--inactive"], - ) - ] + # Controller spawners + robot_controller_spawner = Node( + package="controller_manager", + executable="spawner", + arguments=[robot_controller, "-c", "/controller_manager"], + ) - # Delay loading and activation of `joint_state_broadcaster` after start of ros2_control_node - delay_joint_state_broadcaster_spawner_after_ros2_control_node = ( - RegisterEventHandler( - event_handler=OnProcessStart( - target_action=control_node, - on_start=[ - TimerAction( - period=3.0, - actions=[joint_state_broadcaster_spawner], - ), - ], - ) - ) + gripper_controller_spawner = Node( + package="controller_manager", + executable="spawner", + arguments=["gripper_controller", "-c", "/controller_manager"], ) - # Delay loading and activation of robot_controller_names after `joint_state_broadcaster` - delay_robot_controller_spawners_after_joint_state_broadcaster_spawner = [] - for i, controller in enumerate(robot_controller_spawners): - delay_robot_controller_spawners_after_joint_state_broadcaster_spawner += [ - RegisterEventHandler( - event_handler=OnProcessExit( - target_action=( - robot_controller_spawners[i - 1] - if i > 0 - else joint_state_broadcaster_spawner - ), - on_exit=[controller], - ) - ) - ] + # Timing and sequencing + delayed_joint_state_broadcaster = TimerAction( + period=1.0, + actions=[joint_state_broadcaster_spawner], + ) - # Delay start of inactive_robot_controller_names after other controllers - delay_inactive_robot_controller_spawners_after_joint_state_broadcaster_spawner = [] - for i, controller in enumerate(inactive_robot_controller_spawners): - delay_inactive_robot_controller_spawners_after_joint_state_broadcaster_spawner += [ - RegisterEventHandler( - event_handler=OnProcessExit( - target_action=( - inactive_robot_controller_spawners[i - 1] - if i > 0 - else robot_controller_spawners[-1] - ), - on_exit=[controller], - ) - ) - ] + delayed_robot_controller = TimerAction( + period=1.0, + actions=[robot_controller_spawner], + ) + delayed_gripper_controller = TimerAction( + period=1.0, + actions=[gripper_controller_spawner], + ) return LaunchDescription( - declared_arguments - + [ - control_node, - robot_state_pub_node, + declared_arguments + [ + robot_nodes_spawner_func, rviz_node, - delay_joint_state_broadcaster_spawner_after_ros2_control_node, + ] + + [ + delayed_joint_state_broadcaster, + delayed_robot_controller, + delayed_gripper_controller, ] - + delay_robot_controller_spawners_after_joint_state_broadcaster_spawner - + delay_inactive_robot_controller_spawners_after_joint_state_broadcaster_spawner ) diff --git a/openarm_bringup/launch/test_forward_position_controller.launch.py b/openarm_bringup/launch/test_forward_position_controller.launch.py deleted file mode 100644 index da1f8882..00000000 --- a/openarm_bringup/launch/test_forward_position_controller.launch.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 2025 Reazon Holdings, Inc. -# Copyright 2024 Stogl Robotics Consulting UG (haftungsbeschränkt) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# -# Source of this file are templates in -# [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository. -# -# Author: Dr. Denis -# - -from launch import LaunchDescription -from launch.substitutions import PathJoinSubstitution -from launch_ros.actions import Node -from launch_ros.substitutions import FindPackageShare - - -def generate_launch_description(): - position_goals = PathJoinSubstitution( - [ - FindPackageShare("openarm_bringup"), - "config", - "test_goal_publishers_config.yaml", - ] - ) - - return LaunchDescription( - [ - Node( - package="ros2_controllers_test_nodes", - executable="publisher_forward_position_controller", - name="publisher_forward_position_controller", - parameters=[position_goals], - output={ - "stdout": "screen", - "stderr": "screen", - }, - ) - ] - ) diff --git a/openarm_bringup/launch/test_joint_trajectory_controller.launch.py b/openarm_bringup/launch/test_joint_trajectory_controller.launch.py deleted file mode 100644 index 3e68ef2c..00000000 --- a/openarm_bringup/launch/test_joint_trajectory_controller.launch.py +++ /dev/null @@ -1,51 +0,0 @@ -# Copyright 2025 Reazon Holdings, Inc. -# Copyright 2024 Stogl Robotics Consulting UG (haftungsbeschränkt) -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -# -# Source of this file are templates in -# [RosTeamWorkspace](https://github.com/StoglRobotics/ros_team_workspace) repository. -# -# Author: Dr. Denis -# - -from launch import LaunchDescription -from launch.substitutions import PathJoinSubstitution -from launch_ros.actions import Node -from launch_ros.substitutions import FindPackageShare - - -def generate_launch_description(): - position_goals = PathJoinSubstitution( - [ - FindPackageShare("openarm_bringup"), - "config", - "test_goal_publishers_config.yaml", - ] - ) - - return LaunchDescription( - [ - Node( - package="ros2_controllers_test_nodes", - executable="publisher_joint_trajectory_controller", - name="publisher_joint_trajectory_controller", - parameters=[position_goals], - output={ - "stdout": "screen", - "stderr": "screen", - }, - ) - ] - ) diff --git a/openarm_bringup/package.xml b/openarm_bringup/package.xml index 79967656..e047aa33 100644 --- a/openarm_bringup/package.xml +++ b/openarm_bringup/package.xml @@ -1,7 +1,7 @@ openarm_bringup - 0.3.0 + 1.0.0 Bringup script for OpenArm Thomason Zhou Apache-2.0 diff --git a/openarm_bringup/rviz/bimanual.rviz b/openarm_bringup/rviz/bimanual.rviz new file mode 100644 index 00000000..e6ad21cc --- /dev/null +++ b/openarm_bringup/rviz/bimanual.rviz @@ -0,0 +1,295 @@ +Panels: + - Class: rviz_common/Displays + Help Height: 138 + Name: Displays + Property Tree Widget: + Expanded: + - /Global Options1 + - /Status1 + - /RobotModel1 + Splitter Ratio: 0.5 + Tree Height: 685 + - Class: rviz_common/Selection + Name: Selection + - Class: rviz_common/Tool Properties + Expanded: + - /2D Goal Pose1 + - /Publish Point1 + Name: Tool Properties + Splitter Ratio: 0.5886790156364441 + - Class: rviz_common/Views + Expanded: + - /Current View1 + Name: Views + Splitter Ratio: 0.5 + - Class: rviz_common/Time + Experimental: false + Name: Time + SyncMode: 0 + SyncSource: "" +Visualization Manager: + Class: "" + Displays: + - Alpha: 0.5 + Cell Size: 1 + Class: rviz_default_plugins/Grid + Color: 160; 160; 164 + Enabled: true + Line Style: + Line Width: 0.029999999329447746 + 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 + - Alpha: 1 + Class: rviz_default_plugins/RobotModel + Collision Enabled: false + Description File: "" + Description Source: Topic + Description Topic: + Depth: 5 + Durability Policy: Volatile + History Policy: Keep Last + Reliability Policy: Reliable + Value: /robot_description + Enabled: true + Links: + All Links Enabled: true + Expand Joint Details: false + Expand Link Details: false + Expand Tree: false + Link Tree Style: Links in Alphabetic Order + openarm_body_link0: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_hand: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_hand_tcp: + Alpha: 1 + Show Axes: false + Show Trail: false + openarm_left_left_finger: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_link0: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_link1: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_link2: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_link3: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_link4: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_link5: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_link6: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_link7: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_left_link8: + Alpha: 1 + Show Axes: false + Show Trail: false + openarm_left_right_finger: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_hand: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_hand_tcp: + Alpha: 1 + Show Axes: false + Show Trail: false + openarm_right_left_finger: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_link0: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_link1: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_link2: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_link3: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_link4: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_link5: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_link6: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_link7: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + openarm_right_link8: + Alpha: 1 + Show Axes: false + Show Trail: false + openarm_right_right_finger: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + world: + Alpha: 1 + Show Axes: false + Show Trail: false + Mass Properties: + Inertia: false + Mass: false + Name: RobotModel + TF Prefix: "" + Update Interval: 0 + Value: true + Visual Enabled: true + Enabled: true + Global Options: + Background Color: 48; 48; 48 + Fixed Frame: world + Frame Rate: 30 + Name: root + Tools: + - Class: rviz_default_plugins/Interact + Hide Inactive Objects: true + - Class: rviz_default_plugins/MoveCamera + - Class: rviz_default_plugins/Select + - Class: rviz_default_plugins/FocusCamera + - Class: rviz_default_plugins/Measure + Line color: 128; 128; 0 + - Class: rviz_default_plugins/SetInitialPose + Covariance x: 0.25 + Covariance y: 0.25 + Covariance yaw: 0.06853891909122467 + Topic: + Depth: 5 + Durability Policy: Volatile + History Policy: Keep Last + Reliability Policy: Reliable + Value: /initialpose + - Class: rviz_default_plugins/SetGoal + Topic: + Depth: 5 + Durability Policy: Volatile + History Policy: Keep Last + Reliability Policy: Reliable + Value: /goal_pose + - Class: rviz_default_plugins/PublishPoint + Single click: true + Topic: + Depth: 5 + Durability Policy: Volatile + History Policy: Keep Last + Reliability Policy: Reliable + Value: /clicked_point + Transformation: + Current: + Class: rviz_default_plugins/TF + Value: true + Views: + Current: + Class: rviz_default_plugins/Orbit + Distance: 2.1203250885009766 + Enable Stereo Rendering: + Stereo Eye Separation: 0.05999999865889549 + Stereo Focal Distance: 1 + Swap Stereo Eyes: false + Value: false + Focal Point: + X: 0 + Y: 0 + Z: 0 + Focal Shape Fixed Size: true + Focal Shape Size: 0.05000000074505806 + Invert Z Axis: false + Name: Current View + Near Clip Distance: 0.009999999776482582 + Pitch: 0.410398006439209 + Target Frame: + Value: Orbit (rviz) + Yaw: 0.07539838552474976 + Saved: ~ +Window Geometry: + Displays: + collapsed: false + Height: 1162 + Hide Left Dock: false + Hide Right Dock: false + QMainWindow State: 000000ff00000000fd0000000400000000000001da0000039bfc0200000008fb0000001200530065006c0065006300740069006f006e00000001e10000009b000000ab00fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c00610079007301000000690000039b0000017800fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261000000010000014d0000039bfc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a0056006900650077007301000000690000039b0000012300fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e100000197000000030000081400000051fc0100000002fb0000000800540069006d00650100000000000008140000046000fffffffb0000000800540069006d00650100000000000004500000000000000000000004d50000039b00000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 + Selection: + collapsed: false + Time: + collapsed: false + Tool Properties: + collapsed: false + Views: + collapsed: false + Width: 2068 + X: 60 + Y: 64 diff --git a/openarm_bringup/utils/init_can.sh b/openarm_bringup/utils/init_can.sh deleted file mode 100755 index fc22b743..00000000 --- a/openarm_bringup/utils/init_can.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash -# -# Copyright 2025 Reazon Holdings, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# This script initializes the CAN interface on a Linux system. - -echo Using CAN interface: $1 with $2 - -if [ ! -e $1 ]; then - echo "Device $1 does not exist." - exit 1 -fi - -bitrate=1000000 -sudo slcand -o -c -s8 $1 -sudo ip link set $2 type can bitrate $bitrate -sudo ip link set $2 up -sudo ip link show $2 diff --git a/openarm_hardware/package.xml b/openarm_hardware/package.xml index 7faa56e6..0d0f360f 100644 --- a/openarm_hardware/package.xml +++ b/openarm_hardware/package.xml @@ -17,7 +17,7 @@ --> openarm_hardware - 0.3.0 + 1.0.0 Hardware interface for OpenArm Thomason Zhou Apache-2.0