PS2 Control of A-POD

Wow Kåre, that’s going above and beyond what I expected. I have been away for the computer since the 5th. I do appreciate your effort!

Hi Jim, James and others :smiley:

I’m done with the code so far! :smiley:
I’ve not done much with the translation mode, but to be honest I’ve not used that mode much either.

A-Pod PS2 controls (copied from the controller file):

; [Common Controls] ; - Start Turn on/off the bot ; - L1 A-Pod Mandibles/gripper Open (hold to move) ; - L2 A-Pod Mandibles/gripper Close (hold to move) ; - Circle Toggle Single leg mode, Removed from A-Pod ; - Square Toggle Balance mode ; - Triangle Move body to 35 mm from the ground (walk pos) ; and back to the ground ;- L2 + D-Pad left Decrease gripper torque ;- L2 + D-Pad right Increase gripper torque ; - D-Pad up Body up 10 mm ; - D-Pad down Body down 10 mm ; - R3 Toogle full/half head rotation range (hint push/click the right gimbal) ; - O (Circle) Toggle Rotate mode ; - X (Cross) Toggle Shift mode ; ; [Walk Controls] ; - select Switch gaits ; - Left Stick Walk/Strafe ; ; - Right Stick Rotate, body X rotate ; ; - D-Pad left decrease speed with 50mS (moved from common to walk only control) ; - D-Pad right increase speed with 50mS ; - R1 Toggle Double gait travel height ; - R2 Toggle Double gait travel length ; ; [Shift Controls] ; - Left Stick Shift body X/Z ; - Right Stick Shift body Y and rotate body Y ; ; [Rotate Controls] ; - select Switch rotate function (Head tracking, fixed head, head only) ; - Left Stick L/R: Y rotate, U/D: Z Translate (Shift) ; - Right Stick L/R: Z rotate, U/D: X rotate ; - R1 Moves the Center Point of Rotation to the Head (Hold button) ; - R2 Moves the Center Point of Rotation to the Tail (Hold button) ; - D-Pad left Slower but more accurate indirect control ; - D-Pad right Faster respons on indirect control ; - L3 Reset body rotations, click the left gimbal for neutralizing the IndDualShock

Pay attention to the following:

I moved the selection for the rotate and shift/translate mode from L1/L2 to circle and cross. Simply because that was more logic. It’s easier to open/close the grippers using L1/L2 combined with gimbal control.

Left and right D-Pad in combination with L2 (close gripper ) let you adjust the gripper/FSR torque in 5 steps. Default is the middle torque value. For holding a soda can you need to use the higher torque. :wink:

L3 resets the body rotations. R3 toogle half/full head rotation, very useful if you want to pour a glass of water. 8)

I told you before about the right/left D-Pad in rotation mode.

A little hint when calibrating the grippers/mandibles: He should be able to hold a thin paper without loosing it in the calibrated position.

Also note that you can monitor the FSR values on the terminal. It could be useful to check if your FSR reading are correct. In the idle (no FSR contact) state the readings should be close to 0, mine is around 11. Pay attention to this part in the cfg file:

;[MAX/MIN FSR torque] ;Define the torque range for the A-Pod mandible FSR adin readings ;FSR connected to adin 16 (AX0 on BB2) ;Refer to the Lynxmotion tutorial about the wirings. Use a 10k resistor between GND and ADIN. Connect FSR between ADIN and VCC(+5v) cMandibleFSRmaxTorque con 750 ;Set the upper limit for how hard the grippers can pinch cMandibleFSRminTorque con 300 ;Minimum torque level cMandibleContact con 40 ;readings lower than this means that the mandibles/gripers probably don't touch anything

I’ve set the cMandibleContact to 40 and that’s a good margin in my case. My simple torque control code don’t let the FSR to be much higher than around (cMandibleFSRmaxTorque - 100) value when touching the object at full force, so take that in your considerations if you need to change the values. I guess that you don’t need to change these values though. The only difference is that I’m using the 5645’s.

The code is a little messy here and there. I’ve not added any #IFDEF ApodCode so this version would only work well with A-Pod.

Let me know if you’ve any Q’s.
APod_PS2.zip (199 Bytes)

Thank you Kåre! We are on it! 8)

That’s good to hear! I hope you finally can get your A-Pod alive and ready for sale as a kit. I also hope to one day have a LM version of A-Pod on my desk too :wink: Would be fun to shoot a video of two A-Pods doing cooperative motions. 8)

EDIT: Who are the user “Colorasplosion” (admin?)?

Hi Zenta, Others speaking. :stuck_out_tongue:

My name is Riley and I’ll pretty much be taking over James’ duties, starting with this project. I’ve been following along for a while now, so I think I’m up to speed on the whole thing. I’ll post if I’m lost about something though.
It looks like the last zip file contains the .prj file, but not the rest of the actual code! Post up the rest of the code (or tell me how wrong I am) and I’ll get to testing it here straight away.

Hi Riley,

So, you are new at Lynxmotion? Welcome to the forum! :smiley:
I’m sorry about the empty zipfile. This should be fine though.
APod_PS2.zip (26.8 KB)

Good luck in making this creature moving! Let me know if you got any Q’s.

[size=200]IT WORKS!!![/size]

:open_mouth:

Hi Riley,

Welcome! :slight_smile: You probably have seen my name pop up every now and then. Feel free if you ever have some questions about my work. I’m not always the quickest in answering so pm me if you’re in a hurry. Good to see LM gets more support!

Is James still onboard or is he focusing on other stuff?

Jim, Gratz with your walking A-Pod!

Xan

James is moving on to school and other adventures. Still here for a while longer. :slight_smile:

Good to hear James is still onboard! School is imported to though :slight_smile:

I’m pleased to hear you got it working! :smiley: Did you test the mandibles and checked your FSR readings on the terminal? Have fun!

The FSR had to be rewired cause it broke. :frowning:

Soon though!

This thing is a monster!

Oh, sorry to hear that. Yeah, it is a cute little beer fetching monster… :laughing:

Ok. Quick update. The FSR was broken, but I’ve replaced that. One of the leg servos was going out which was giving me some trouble. Turns out that the SSC-32 pin was was only somewhat working. Swapped it to a different pin and now it works wonderfully. :smiley:

I’ve been commanded to shoot a video, but I might not actually be able to post it until tomorrow. We’ll see.

Yeah :smiley: :smiley: :smiley: :smiley:

We got sort of sidetracked with the PS2 arm control code problem. Video is delayed till next week. I have noticed that the legs can touch each other. Probably due to the longer coxa offset we used. Probably need to restrict the horizontal range a little.

Also the mandible control is awesome and works perfectly. The overall control appears to be pretty intuitive, Riley was able to control the bot to pick up a water bottle and walk around with it with ease! 8)

This should not happen unless you are talking about sudden large changes from the controller. In normal operation they shouldn’t touch each other. Are you sure you’ve changed all values in the cfg file, e.g. the coxa length? The travel-length should be the same on both robots. This mean that if your coxa length is longer the IK math would take this in consideration. Also check that the front and rear coxa are calibrated correctly (45 deg). I don’t think the body dimensions or the leg width are that different between the two A-Pods.

That’s great! So, did the FSR torque control work fine? I’ve been amazed more than one time for how much load it can handle, sounds like you’ve fun! :smiley:

Yes! It was very useful, as I didn’t have to spend the whole time making sure the servos weren’t straining. It applied sufficient torque to lift the bottle, and that’s it. Very nice! :smiley:
I saw that you’ve included the ability to increase or lower the amount the mandibles would grip. The bottle was nearly empty, so I didn’t need to mess with these at all. I suspect that you would need to increase the setting to lift a full one, but I don’t think that it would be a problem. Next time I mess with the robot, I’ll not use the bottle I’ve been drinking out of! :stuck_out_tongue: