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

Lift and arm trajectories #110

Merged
merged 10 commits into from
Oct 6, 2021
Merged

Conversation

hello-binit
Copy link
Contributor

@hello-binit hello-binit commented Oct 1, 2021

This PR makes three methods available for the arm and lift joints:

  • follow_trajectory(): initiates execution of a waypoint trajectory
  • update_trajectory(): used to update the hardware with the next segment of the waypoint trajectory (rarely used by users)
  • stop_trajectory(): used to stop execution of a waypoint trajectory

The previous work on trajectory management classes and waypoint trajectory RPCs is used here to provide a high level interface to commanding waypoint trajectories. This PR includes unit tests of the new methods, and a small example program is reproduced here:

import stretch_body.arm

a = stretch_body.arm.Arm()
a.motor.disable_sync_mode() # not necessary when using arm from the Robot class
a.startup()

a.trajectory.add(t_s=0, x_m=0.1)
a.trajectory.add(t_s=3, x_m=0.2)
a.trajectory.add(t_s=6, x_m=0.15)
a.follow_trajectory()
print('Executing {0}'.format(a.trajectory))
time.sleep(6)

a.trajectory.clear()
a.stop()

@hello-binit hello-binit marked this pull request as ready for review October 6, 2021 06:32
Base automatically changed from feature/traj_classes to develop October 6, 2021 14:57
@hello-binit hello-binit merged commit 7d2b2a6 into develop Oct 6, 2021
@hello-binit hello-binit deleted the feature/lift_arm_trajectories branch October 6, 2021 15:01
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.

None yet

1 participant