-
Notifications
You must be signed in to change notification settings - Fork 22
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
Mobile base trajectories #114
Conversation
eaef071
to
fcad9ad
Compare
5938549
to
49ab7e8
Compare
3ac8b6d
to
5befcf9
Compare
b21bd01
to
94a35db
Compare
5befcf9
to
1e0616a
Compare
@hello-binit A quick query - in this, what does the following snippet do? I am trying to create a piecewise trajectory that can control the base. However, I am unable to control it if I don't move the wrist as well. Does this have something to do with the sync mode? |
Hi @praveenVnktsh, good question! Motion of Stretch's four main joints are synchronized. These four joints are left wheel, right wheel, lift, and arm. When you issue a command to these joints, they don't start execution immediately. They wait for a "synchronizing pulse" at the embedded level to start motion in unison with each other. For example, this is why the robot moves perfectly forward when you command the base to move forward 1 meter; if there was no pulse, the left wheel might start a few milliseconds before the right wheel starts moving, resulting in the robot skewing right. The sync pulse comes from a PCB called the "pimu", and you can interact with the pimu from Stretch Body to manually issue pulses using The wrist isn't a Hello Robot embedded device, it's actually a Dynamixel device, so it doesn't know or care about sync pulses. So there shouldn't be any reason why the base would refuse to execute a piecewise trajectory until the wrist moves. If you're willing to share the snippet you're developing, you can create a new topic on our Forum, and I'd be happy to help you with it. |
This PR makes the trajectory interface available for the mobile base. In order to support trajectories composed of translations and rotations, a new trajectory class
DiffDriveTrajectory
is defined. Waypoints are given as SE2 poses (x, y, theta) of the base. There must only be translation or rotation between two of these poses. These waypoints are converted into motor space linear trajectories, and sent simultaneously to left and right wheels to perform coordinated motion.Unit tests of single and multi DOF trajectories are part of this PR and tested on a robot in Ubuntu 18.04/Python 2. An example program is reproduced here:
The trajectory above sends the robot forward 0.4m, rotates around 180 degrees, forward again 0.4m, rotates again 180 degrees, ending up exactly where the robot started off.