Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Implement MoveIt Servo #23

Merged
merged 14 commits into from
Oct 13, 2023
Merged

Implement MoveIt Servo #23

merged 14 commits into from
Oct 13, 2023

Conversation

amalnanavati
Copy link
Contributor

@amalnanavati amalnanavati commented Oct 4, 2023

Description

This PR configures MoveIt Servo and its affiliated controllers.

Testing

Setup:

  1. Pull pr_ros_controllers#28 and re-build your workspace.
  2. Launch the force-torque sensor:
    1. Sim: ros2 run ada_feeding dummy_ft_sensor.py
    2. Real: ros2 run forque_sensor_hardware forque_sensor_hardware
  3. Launch MoveIt:
    1. Sim:ros2 launch ada_moveit demo.launch.py sim:=mock
    2. Real: ros2 launch ada_moveit demo.launch.py
  4. Re-tare the F/T sensor: ros2 service call /wireless_ft/set_bias std_srvs/srv/SetBool "{data: true}"

Testing:

  • Using RVIZ, generate and execute a plan. Verify it successfully executes.
    • Sim
    • Real
  • Enable MoveIt Servo:
    • Switch Controllers: ros2 service call /controller_manager/switch_controller controller_manager_msgs/srv/SwitchController "{activate_controllers: [\"jaco_arm_servo_controller\"], deactivate_controllers: [\"jaco_arm_controller\"], start_controllers: [], stop_controllers: [], strictness: 0, start_asap: false, activate_asap: false, timeout: {sec: 0, nanosec: 0}}"
    • Toggle Servo On: ros2 service call /servo_node/start_servo std_srvs/srv/Trigger "{}"
  • Run the keyboard teleop script: ros2 run ada_moveit ada_keyboard_teleop.py
    • Verify that the robot moves smoothly while the keys are pressed.
      • Cartesian Control Linear (also verify that the orientation doesn't change):
        • Sim (NOTE: In order to see updates in sim, you need to switch the planning group back to hand and then toggle off and on the MotionPlanning element in RVIZ.)
        • Real
      • Cartesian Control Angular (also verify that the position doesn't change):
        • Sim (see NOTE above)
        • Real
      • Joint Control:
        • Sim (see NOTE above)
        • Real
    • Verify that the robot stops immediately when the keys are released.
      • Sim (see NOTE above)
      • Real
  • Disable MoveIt Servo: ros2 service call /servo_node/stop_servo std_srvs/srv/Trigger "{}"
  • Using RVIZ, generate and execute a plan. Verify it successfully executes.
    • Sim
    • Real
  • Using RVIZ, generate and execute a plan. Exert a force on the F/T sensor during execution. Verify that it fails.
    • Real

Follow-Up PR

This PR suffers from getting stuck in singularities during cartesian control. At such times, it is possible to get it out of those singularities by using joint control, but that may not always be super intuitive. Using IK instead of the inverse jacobian -- and particularly pick_ik -- seems to be able to alleviate this issue. Another approach is to modify the MoveIt Servo source here to use dampened jacobians. There should be a follow-up PR to address that.

@amalnanavati amalnanavati marked this pull request as ready for review October 13, 2023 17:30
@amalnanavati amalnanavati requested a review from egordon October 13, 2023 17:30
@amalnanavati
Copy link
Contributor Author

amalnanavati commented Oct 13, 2023

@egordon this PR is ready to review. I'll make the IK investigation another PR so it isn't blocking your acquisition work. As of this PR, MoveIt Servo should work on both sim and real.

@amalnanavati amalnanavati changed the title [WIP] Implement MoveIt Servo Implement MoveIt Servo Oct 13, 2023
ada_moveit/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@egordon egordon left a comment

Choose a reason for hiding this comment

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

Honestly, pretty much all of this is config / build modification. And I don't feel the need to thoroughly look at the keyboard teleop script.

So other than the TODO you already mentioned (I agree it is better to have most things in the parent README, or at least a link to sub-READMEs if it gets too long), if tests pass and you can run the mock sim just fine, I don't see an issue with merging this.

@amalnanavati amalnanavati merged commit 760d283 into main Oct 13, 2023
@amalnanavati amalnanavati deleted the amaln/moveit_servo branch October 13, 2023 20:08
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.

2 participants