abb_ros2 icon indicating copy to clipboard operation
abb_ros2 copied to clipboard

Remove hardcoded joint prefix

Open ggorjup opened this issue 10 months ago • 2 comments

Hello, this PR removes the hardcoded IRB1200 prefix assigned to standardized joint names obtained through RWS.

Bugfix

When multiple mechanical unit groups are defined in RobotStudio, their names are used to construct a prefix when deriving standardized joint names in abb_egm_rws_managers/SystemDataParser. When stripping the hardcoded IRB1200, the hardware interface stripped also the mechanical unit group prefix, likely causing https://github.com/PickNikRobotics/abb_ros2/issues/77.

This was tested in RobotStudio, using the IRB1200_5_90.rspag project and RobotWare 6.16.

Joint names

When initializing the hardware interface, standardized EGM joint names are matched with URDF joint names. With the RWS manager, the standardized joint names are constructed like this: <robot_controller_id>_ + <mech_unit_group>_ + joint_ + <index>

The mech_unit_group is obtained from the controller and is applied if there is more than one.

The robot_controller_id can be specified in the establishRWSConnection method, which passes it to the RWS manager / SystemDataParser, which pre-pends it to the standardized joint names (if defined).

Before

For a single arm, the standardized joint names were: IRB1200_joint_1, IRB1200_joint_2, ... Stripping everything before joint_ gave us joint_1, joint_2, ... which was fine as long as URDF joints followed the same convention.

For two arms, the standardized joint names were: IRB1200_rob1_joint_1, IRB1200_rob1_joint_2, ... IRB1200_rob2_joint_1, IRB1200_rob2_joint_2, ... In this case, stripping everything before joint_ also discarded the rob1_ and rob2_ prefixes.

After

After dropping the IRB1200 prefix, we no longer need to do stripping when matching joint names. For a single arm, we get joint_1, joint_2, .. directly from the RWS manager.

For two arms, we get standardized joint names: rob1_joint_1, rob1_joint_2, ... rob2_joint_1, rob2_joint_2, ... Which is also fine, as long as the URDF follows the same convention.

Remaining issue

With this solution and RWS (RobotWare < 7.0 and configure_via_rws flag is set), URDF joint names must match the names generated by the RWS manager. For example, it is not possible to define a custom prefix for single-arm joint names.

ggorjup avatar Apr 08 '25 09:04 ggorjup