osrf / mbzirc

Simulator for the MBZIRC Maritime Grand Challenge
Apache License 2.0
72 stars 47 forks source link

Add light weight suction gripper with updated multicopter velocity controller #196

Closed iche033 closed 2 years ago

iche033 commented 2 years ago

Signed-off-by: Ian Chen ichen@osrfoundation.org

Alternative to #194

In comparison to #194, this PR adds the proposed changes while preserving existing behavior of multicopters with the original suction grippers by

Some minor issues I noticed when testing the lightweight gripper:

It's possible that we could tune other params to make the flight behavior more stable but at this stage, we prefer not to make more changes. The original gripper has its own caveats. We just give the users an extra option to choose whichever works best for them.

To test:

  1. launch the test environment

    ros2 launch ros_ign_gazebo ign_gazebo.launch.py ign_args:="-v 4 -r test/simple_demo_manip.sdf"
  2. Remove a test model in this environment that is not needed

    ign service -s /world/simple_demo/remove --reqtype ignition.msgs.Entity --reptype ignition.msgs.Boolean --timeout 300 --req 'name: "box1kg" type: MODEL'
  3. Spawn a quadrotor with the lightweight suction gripper - the new gripper should be green in color

    ros2 launch mbzirc_ign spawn.launch.py name:=quadrotor_1 world:=simple_demo model:=mbzirc_quadrotor type:=uav x:=-0  y:=2.05 z:=1.92 R:=0 P:=0 Y:=0 gripper:=mbzirc_suction_gripper_light
  4. Enable suction

    ros2 topic pub --once /quadrotor_1/gripper/suction_on std_msgs/msg/Bool 'data: True'
  5. Take off with the blue small box payload

    ros2 topic pub --once /quadrotor_1/cmd_vel geometry_msgs/msg/Twist '{linear: {x: 0.0, y: 0.0, z: 5}, angular: {x: 0.0, y: 0.0, z: 0.0}}'

    the quadrotor should fly upwards in z faster than with the original suction gripper

  6. Make the quadrotor hover

    ros2 topic pub --once /quadrotor_1/cmd_vel geometry_msgs/msg/Twist '{linear: {x: 0.0, y: 0.0, z: 0}, angular: {x: 0.0, y: 0.0, z: 0.0}}'

    the quadrotor should hover in place with some small drift