- Set angle in
setGripperPos
accordingly - Check arm dimensions in
getArmDimensions
- Edit coordinates of cube holders in WHERE?
- Come up with robot path in
testCubeManip2
- Set angle in
setGripperPos
accordingly - Check arm dimensions in
getArmDimensions
- Update robot path in
testDrawing
- Disable Servo 5 limit check in
initDynamixels
- Disable Servo 5 auto open in
initDynamixels
- Set the initial angle of the wire
- Run
playBuzzWire
- Set Tend in
assignViaTimes
- {Alex} Skeleton code for the entirety of Task 2.1/2, able to specify the orientations and locations of the cubes
- Function that takes in initial and desired cube states:
initial_cube_state
:initial_cube_state = [ [3,-8, 1, 0]; [9, 0, 1, 0]; [6, 6, 1, 0] ].';
- (cube grid i, cube grid j, cube stack height, cube orientation)
- Cube orientation (multiply by 90 degrees to get sensible rotation):
0
: upwards90
: towards robot-90
: away from robot180
: downwards
desired_cube_state
:- Similar in structure to
initial_cube_state
. - Assume that cubes maintain the same index across the two variables
- Similar in structure to
- Outputs:
- Desired intermediate waypoints that result in all cubes facing up
- Valid occupancy grids for planning from one waypoint to the next
- A set of collision-free via points for the end effector from one waypoint to the next
- Function that takes in initial and desired cube states:
- Create a way for us to manually declare path of cubes just in case, so it can be changed on demo day
- {TY} Refactor
inverseKin2
/inverseKinDynamixel2
to be more elegant -inverseKinDynamixel2
should be a wrapper aroundinverseKin2
- {TY} Software API for interfacing with Servo 5 (function to open and close gripper)
- {TY} Write cube grabbing/depositing function - pseudocode:
- We can call
mainServoLoop
within a wrapper function with the relevant arguments. - Procedure:
- Grabbing Cube
- *entry point: End effector at goal point
- Move end effector to grasp cube (hard-code downwards 20mm?)
- Close Gripper
- Move end effector to next start point (hard-code upwards 20mm?)
- *exit point: End effector follows the next set of via points
- Dropping Cube
- *entry point: End effector at goal point
- Move end effector to deposit cube (hard-code downwards 20mm?)
- Open Gripper
- Move end effector to next start point (hard-code upwards 20mm?)
- *exit point: End effector follows the next set of via points
- Grabbing Cube
- We can call
- {TY} Expand A* Search space of theta_g to +- pi/2 (with sensible intervals)
- {Alex} Tune variable
Tend
generation ininterpViaPoints
- Test function with arbitrary cube locations, orientations.
- Skeleton code for the entirety of Task 2.3, able to specify the orientations and locations of the cubes
- Similar to Task 2.1, we will take in initial positions of the cubes and a target position to stack the cubes on.
- Function that takes in initial cube positions and orientations, and a target cube-stacking position. Outputs:
- Desired intermediate waypoints
-
Figure out starting position of robot and pen
-
Picking up pen with gripper
- Get to position of pen
- close gripper
-
Change end effector position to end of pen
- Can be done by increasing L4 (possibly a bool parameter in IK that says whether we are holding pen or not can allow easy switching)
-
Test performance of velocity-based control with pen (may tilt)
- Make sure 3d printed gripper can hold the pen and it doesn't tilt (find out coords to pick up vertically)
- Make sure it can get to all positions possible on the drawing board
-
Convert shapes to draw into waypoints or endpoints
- HELPER: Translate center of the arc, the radius, the degrees of the arc and the start and end co-ordinates into set of waypoints along this arc
- HELPER: Translation function for interpolating line between waypoints (should have this already)
-
Plan out entire trajectory
- Pick up pen
- 3 straight lines
- 1 partial circle of 270 degrees with constant radius
- Put back pen
-
Tune values (can also be tuned on the day)
- Number waypoints
- Tend for each segment?
-
implentment functions fo line/arc drawing
-
[ ]
-
making thetaG variable axross the drwaing
- CAD the gripper to rotate through translation
- Extend wire of buzzer
- Plan trajectory of wire
- Code structure
- Helper: Theta 5 (how open gripper is) -> Rotation of gripper
- Helper: Path generation
- Take waypoints - corners? and interpolate lines between them
- More adaptable - take picture of path to determine waypoints, and then follow these
- Determine how to rotate based on direction of path
- Main driver
- Steps
- Draw path by hand (or declare waypoints manually)
e.g.
¦
¦
/ / ¦ ¦ - Determine angle of buzzer depending on direction of path
- Draw path by hand (or declare waypoints manually)
e.g.
¦
¦
- Before session
- Verify if waypoints / angles look good for Task 4
- During session
- Tune / figure out new gripper
- Figure out mapping from buzzAngle to theta5
- Try basic path, more complicated path, 3D
- Re-record Task 2 with better Tend adjustment
- Tune / figure out new gripper
- MUST
- Record more complicated path
- Find a way to fix position of wire, so we aren't playing around with it
- Path 1
- Fix on new gripper
- Fix IK to get it to work
- Run on complicated path
- Path 2
- Re-record Task 2 with better Tend adjustment / accuracy
- Easy entry point to calibrate each servo with position based offsets (for actual day)
- Fix droop when transitioning from Feedforward + PI control
- Perhaps, we can monitor servo load before setting all velocities to 0, or fade them to 0 more slowly.
- Benchmark code to determine performance bottleneck (if any) in control loop
Notes: Program Flow -> Bootup initial position -> Goal waypoints
Calculate A* waypoints from initial position->waypoint_1->...->waypoint_N -> Create list of via points
for vias in via_point_list:
positions = [[],[],[]]
heavy-lifting calculation for each adjacent position:
- get via point set by A* search
- Interpolate between via points -> coeffs
for each adjacent position:
- write to servos
- General
- Benchmark code
- Task 2
- Tune occupancy grid generation to match the real-world dimensions of each cubes and cube holders
- Test cube picking and dropping with 1 cube
- Test and tune cube translation for 1 cube in 3 locations
- Test cube rotation for 1 cube in 3 locations
- Task 3
- Convert shapes to draw into waypoints or endpoints
- Figure out starting position of robot and pen
- Change end effector position to end of pen
- Internal Soft Deadline to implement Task 2.1, 2.2.
- Internal HARD Deadline to film Task 2.1, 2.2.
- Internal Deadline to implement Task 3.
- Internal HARD Deadline to film Task 3.
- Start thinking about implementing self-proposed task.
- Start writing report
NOTES:
- For cubePickPlace([225, 0, 50, -pi/2], [225, 0, 30, -pi/2], [225, 0, 50, -pi/2], true, port_num) cubePickPlace([225, 0, 50, 0], [225, 0, 20, 0], [225, 0, 50, 0], true, port_num)
Things to try:
- Change the grid resolution in A*
- Tune the PID parameters back to default
- Decrease P gains to stop sticking to positions?
- Tune parameters for new gripper (first check it can get to 2nd placeholder)
- Interpolation for theta G in A*
- Destination cube height solution
startIdx =
3 18 13 10
goalIdx =
5 5 18 6