I am setting up a robot that has two arms, setup in different namespaces (arm1, arm2), using ROS Melodic and moveit. They publish separate joint_state messages, based on the namespace (`/arm1/joint_states` and `/arm2/joint_states`) and those joint states show up correctly for both arms. The tf tree has both arms in it, with correct names (e.g., `arm1_ee_link` and `arm2_ee_link`) When I call:
`arm_1 = moveit_commander.MoveGroupCommander('manipulator', '/arm1/robot_description', '/arm1'))`
`arm_2 = moveit_commander.MoveGroupCommander('manipulator', '/arm2/robot_description', '/arm2'))`
and run:
`print(arm_1.get_current_joint_values()`
`print(arm_2.get_current_joint_values()`
The printed joint values are both from arm_1. If I swap the order of the `MoveGroupCommander` calls, so that arm_2 is created first, then the printed joint values are both from arm_2. Note that the `arm1/joint_states` and `/arm2/joint_states` topics continue to report correct results for both arms, unlike the results from the moveit `get_current_joint_values()` call.
I get similar results from calling:
`robot_1 = moveit_commander.RobotCommander('/arm1/robot_description', '/arm1')`
`robot_2 = moveit_commander.RobotCommander('/arm2/robot_description', '/arm2')`
and then running:
`print('robot 1 state', robot_1.get_current_state())`
`print('robot 2 state', robot_2.get_current_state())`
The printed joints are the same for robot_1_state and robot_2_state, the values are dependent on whether robot_1 or robot_2 is created first.
I am wondering if this problem is related to the one addressed by [this pull request](https://github.com/ros-planning/moveit/commit/72c012642ba534598daf1d2c0eb118f4e403acd4). I don't know if it got implemented.
↧