Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Oberon7 arm and gripper #72

Merged
merged 17 commits into from
Apr 11, 2022
Merged

Add Oberon7 arm and gripper #72

merged 17 commits into from
Apr 11, 2022

Conversation

iche033
Copy link
Collaborator

@iche033 iche033 commented Mar 25, 2022

Replaces #68

Depends on gazebosim/gz-sim#1405 and gazebosim/gz-sim#1406

Ported and integrated the oberon7 arm from DAVE / UUV simulator. The arm and gripper model.sdf files are generated using urdf files from:
https://github.com/Field-Robotics-Lab/uuv_manipulators/tree/master/oberon7/oberon7_description
https://github.com/Field-Robotics-Lab/dave/tree/master/urdf/manipulators/dave_oberon7_description

The spawn launch file is updated to take two additional arguments: arm and gripper to specify the arm and gripper model to use. Currently we only have one arm but we will need be able to swap out the oberon7 gripper with the suction gripper from #63.

The arm must be spawned with the usv. Currently it only has one mounting position on the usv for the arm. More maybe added in the future.

usv_oberon7_arm_gripper

Usage:

# launch simple demo world
ros2 launch ros_ign_gazebo ign_gazebo.launch.py ign_args:="-v 4 -r simple_demo.sdf"

# spawn usv with oberon7 arm and oberon7 gripper.
# if gripper is not specified, it'll just use the default one which is the oberon7 gripper
ros2 launch mbzirc_ign spawn.launch.py name:=usv world:=simple_demo model:=usv type:=usv x:=15 y:=0 z:=0.3 R:=0 P:=0 Y:=0 arm:=mbzirc_oberon7_arm gripper:=mbzirc_oberon7_gripper

Try publishing topics to control the arm and gripper joints:

# arm
ros2 topic pub --once /usv/arm/joint/azimuth/cmd_pos std_msgs/msg/Float64 'data: 0.5'
ros2 topic pub --once /usv/arm/joint/shoulder/cmd_pos std_msgs/msg/Float64 'data: 0.5'
ros2 topic pub --once /usv/arm/joint/elbow/cmd_pos std_msgs/msg/Float64 'data: 0.5'
ros2 topic pub --once /usv/arm/joint/roll/cmd_pos std_msgs/msg/Float64 'data: 0.5'
ros2 topic pub --once /usv/arm/joint/pitch/cmd_pos std_msgs/msg/Float64 'data: 0.5'
ros2 topic pub --once /usv/arm/joint/wrist/cmd_pos std_msgs/msg/Float64 'data: 0.5'
# gripper
ros2 topic pub --once /usv/arm/gripper/joint/finger_left/cmd_pos std_msgs/msg/Float64 'data: 0.5'
ros2 topic pub --once /usv/arm/gripper/joint/finger_right/cmd_pos std_msgs/msg/Float64 'data: 0.5'

You can also echo the joint states

ros2 topic echo /usv/arm/joint_states

ros2 topic echo /usv/arm/gripper/joint_states

Here's the tf tree:

frames

mjcarroll and others added 8 commits March 25, 2022 11:43
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Michael Carroll <michael@openrobotics.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
iche033 added 3 commits March 25, 2022 14:48
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@caguero caguero self-requested a review March 31, 2022 17:48
Base automatically changed from refactor_spawn to main March 31, 2022 22:03
iche033 added 3 commits March 31, 2022 15:13
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Copy link
Collaborator

@caguero caguero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm following your instructions but I don't see the arm mounted in the USV when I run: ros2 launch mbzirc_ign spawn.launch.py name:=usv world:=simple_demo model:=usv type:=usv x:=15 y:=0 z:=0.3 R:=0 P:=0 Y:=0 arm:=mbzirc_oberon7_arm gripper:=mbzirc_oberon7_gripper

gripper_prefix = f'/world/{world_name}/model/{model_name}/model/arm/model/gripper'
return Bridge(
ign_topic=f'{gripper_prefix}/joint_state',
ros_topic='/joint_states',
Copy link
Collaborator

@caguero caguero Apr 7, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just checking, should this topic be the same as the one used for the arm joint states?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen both cases before:

  • /joint_states
  • /<namespace>/joint_states

I think other packages like moveit subscribes to /joint_states by default but can be configured to subscribe to namespaced topics.

I changed to the form /<namespace>/joint_states for the arm and gripper in 00ed7c1. It's now:

/usv/arm/joint_states
/usv/arm/gripper/joint_states

The user can remap them back to /joint_states if they wish.

@caguero
Copy link
Collaborator

caguero commented Apr 8, 2022

```shell
ros2 launch mbzirc_ign spawn.launch.py name:=usv world:=simple_demo model:=usv type:=usv x:=15 y:=0 z:=0.3 R:=0 P:=0 Y:=0 arm:=mbzirc_oberon7_arm gripper:=mbzirc_oberon7_gripper

Forget this comment, I can see the arm now after cleaning and rebuilding.

Copy link
Collaborator

@caguero caguero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fingers of the gripper start completely closed. I can open the fingers but I can't close them entirely anymore.

@iche033
Copy link
Collaborator Author

iche033 commented Apr 9, 2022

The fingers of the gripper start completely closed. I can open the fingers but I can't close them entirely anymore.

hmm I'm trying to reproduce this. Here's what I'm doing but I see that the fingers are able to close. What are the joint cmds you're using?

# open gripper
ros2 topic pub --once /usv/arm/gripper/joint/finger_right/cmd_pos std_msgs/msg/Float64 'data: 1'
ros2 topic pub --once /usv/arm/gripper/joint/finger_left/cmd_pos std_msgs/msg/Float64 'data: 1'

# close gripper
ros2 topic pub --once /usv/arm/gripper/joint/finger_right/cmd_pos std_msgs/msg/Float64 'data: 0'
ros2 topic pub --once /usv/arm/gripper/joint/finger_left/cmd_pos std_msgs/msg/Float64 'data: 0'

oberon7_finger_opening_closing

@caguero
Copy link
Collaborator

caguero commented Apr 11, 2022

ros2 topic pub --once /usv/arm/gripper/joint/finger_right/cmd_pos std_msgs/msg/Float64 'data: 1'

Works for me as well. It was doing it in the wrong way.

Copy link
Collaborator

@caguero caguero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready to approve, just a minor question about the joint states from the gripper.

iche033 added 2 commits April 11, 2022 11:11
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
Signed-off-by: Ian Chen <ichen@osrfoundation.org>
@iche033 iche033 merged commit 3b01e7f into main Apr 11, 2022
@iche033 iche033 deleted the oberon7_arm_refactor branch April 11, 2022 20:22
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants