Skip to content

Add can_fd launch argument - #97

Merged
kou merged 3 commits into
enactic:mainfrom
pradeepsuryad:add-can-fd-arg
Oct 2, 2026
Merged

kou merged 3 commits into
enactic:mainfrom
pradeepsuryad:add-can-fd-arg

Conversation

@pradeepsuryad

Copy link
Copy Markdown
Contributor

Fixes #65

Depends on enactic/openarm_description#78, which needs to be merged first.

Changes

  • Add a can_fd launch argument (default true) to openarm_bringup/launch/openarm.bimanual.launch.py and openarm_bimanual_moveit_config/launch/demo.launch.py, and pass it through xacro mappings.
  • demo.launch.py processes xacro twice: once with xacro.process_file() for ros2_control_node, and once with MoveItConfigsBuilder.robot_description() for move_group/RViz. The second call didn't get any CAN mappings. Both now get can_fd, left_can_interface and right_can_interface, so the two robot descriptions stay consistent.
  • Add can_fd to the parameter list in openarm_bringup/README.md.

Test

I built openarm_can, openarm_hardware, openarm_bringup, openarm_bimanual_moveit_config and openarm_description (with #78) on ROS 2 Jazzy and ran the launch files with use_fake_hardware:=false. No CAN device was attached, so OpenArmHW fails when it opens the socket, but it logs its parsed configuration first. For each launch I read robot_description with ros2 param get (from /robot_state_publisher for bringup and from /move_group for the demo) and checked the OpenArmHW log:

ros2 launch ... (all with use_fake_hardware:=false) robot_description: left / right can_interface, can_fd OpenArmHW log
openarm_bringup openarm.bimanual.launch.py arm_type:=v10 can1 / can0, True CAN=can1, ..., can_fd=enabled
openarm_bringup openarm.bimanual.launch.py arm_type:=v10 can_fd:=false can1 / can0, False CAN=can1, ..., can_fd=disabled
openarm_bringup openarm.bimanual.launch.py arm_type:=v20 can1 / can0, True CAN=can1, ..., can_fd=enabled
openarm_bringup openarm.bimanual.launch.py arm_type:=v20 can_fd:=false right_can_interface:=can2 left_can_interface:=can3 can3 / can2, False CAN=can3, ..., can_fd=disabled
openarm_bimanual_moveit_config demo.launch.py arm_type:=v10 can_fd:=false /move_group: can1 / can0, False CAN=can1, ..., can_fd=disabled
openarm_bimanual_moveit_config demo.launch.py arm_type:=v20 can_fd:=false right_can_interface:=can2 left_can_interface:=can3 /move_group: can3 / can2, False CAN=can3, ..., can_fd=disabled

Only the left arm appears in the OpenArmHW log because its init fails first without a CAN device. The right arm's values come from robot_description.

The v10 rows don't depend on #78, because openarm_v10.urdf.xacro is unchanged there. pre-commit run passes.

Note

Other parts of openarm_bringup/README.md look outdated: it mentions openarm.launch.py, hardware_type and can_interface, which no longer exist. I can update it in a separate PR if that would help.

openarm_hardware already reads a `can_fd` hardware parameter, but the
launch files had no way to set it, so CAN 2.0 users had to edit them.

Add a `can_fd` argument (default: true) to openarm.bimanual.launch.py
and the bimanual MoveIt demo.launch.py and pass it to xacro alongside
the CAN interface arguments.
demo.launch.py processes xacro twice: once for ros2_control_node and
once via MoveItConfigsBuilder.robot_description() for move_group/RViz.
Only the first one received the CAN mappings. Pass `can_fd`,
`left_can_interface` and `right_can_interface` to both so the two
robot descriptions stay consistent.
@kou
kou merged commit 831367a into enactic:main Oct 2, 2026
1 check passed
@kou

kou commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Thanks!

Other parts of openarm_bringup/README.md look outdated: it mentions openarm.launch.py, hardware_type and can_interface, which no longer exist. I can update it in a separate PR if that would help.

Please do it!

kou pushed a commit that referenced this pull request Oct 6, 2026
Follow-up to #97, as discussed there.

`openarm_bringup/README.md` still described the launch interface from
before #91:

- `openarm.launch.py` (single arm) no longer exists.
`openarm.bimanual.launch.py` is the only launch file.
- `hardware_type` and `can_interface` are no longer launch arguments.
Fake vs. real hardware is `use_fake_hardware`, and each arm has its own
`right_can_interface` / `left_can_interface`.
- The `arm_type` default is now `openarm_v2.0`, not `v10`.
- The Quick Start said "fake hardware" but passed `hardware_type:=real`.

This updates the Quick Start (v2.0 with fake hardware, and v1.0 with
real hardware), the launch file list and the parameter list. Every
argument and default in the list matches what
`openarm.bimanual.launch.py` declares.

## Test

On ROS 2 Jazzy:

- `ros2 launch openarm_bringup openarm.bimanual.launch.py`: both mock
hardware interfaces load, and `joint_state_broadcaster`, both joint
trajectory controllers and both gripper controllers are configured and
activated.
- `ros2 launch openarm_bringup openarm.bimanual.launch.py arm_type:=v10
use_fake_hardware:=false`: `OpenArmHW` loads with `CAN=can1, ...,
can_fd=enabled`. No CAN device was attached, so it stops when it opens
the socket.
- `ros2 launch openarm_bringup openarm.bimanual.launch.py
robot_controller:=forward_position_controller`: both forward position
controllers are activated.

## Note

I left `arm_prefix` out of the parameter list because setting it
currently breaks controller loading. With `arm_prefix` set,
`openarm.bimanual.launch.py` switches the controllers file to
`openarm_bimanual_controllers_namespaced.yaml`. That file was removed in
#91, when `openarm_v10_bimanual_controllers.yaml` was renamed to
`openarm_bimanual_controllers.yaml`, and the namespaced variant wasn't
re-added. For example, `ros2 launch openarm_bringup
openarm.bimanual.launch.py arm_prefix:=leader` gives:

```
[WARNING] [launch_ros.actions.node]: Parameter file path is not a file: .../openarm_bringup/config/controllers/openarm_bimanual_controllers_namespaced.yaml
[ERROR] [leader.controller_manager]: The 'type' param was not defined for 'joint_state_broadcaster'.
[FATAL] [leader.spawner_joint_state_broadcaster]: Failed loading controller joint_state_broadcaster
```

I can fix that in a separate PR if that would help.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add can_fd argument to bringup launch arguments

2 participants