PDA

View Full Version : [Project] Anansi - a PhantomX hexapod



RobotAtlas
12-18-2010, 11:42 PM
Today my 6 an 8 year olds helped me assemble PhantomX hexapod from the barebones kit Trossen sells.
Assembly instructions are so good that this robot worked the first time it was turned on.
Because the plans are to make it run with ROS, I decided to name it Anansi (pronounced Ah-nahn-see]- an intelligent spider. See http://en.wikipedia.org/wiki/Anansi).
Here's a short video of what happens when you just turn it on:

http://www.youtube.com/watch?v=0xkX5L6S7yU

My bluetooth dongle is not supported by ROS, and I don't have an ArbotiX Commander, so I guess I'll need to try NUKE with it first to see how it works.

lnxfergy
12-18-2010, 11:47 PM
My bluetooth dongle is not supported by ROS, and I don't have an ArbotiX Commander, so I guess I'll need to try NUKE with it first to see how it works.

If you have a pair of xbees -- you should be able to connect to it using Pypose/NUKE's "test drive" feature with the firmware/sketch distributed for the kit (which is basically the output of NUKE for that configuration of hex with a few tweaks to add new gaits and clean up the speed limits/etc). EDIT: You can also launch the test drive program separately -- it's actually just a program called "commander.py" in the pypose folder -- and as you might guess by the name, it just emulates the Commander protocol.

I've probably also got to clean up / post docs on using NUKE output sketches with ROS (as I haven't yet gotten that onto any wikis).

-Fergs

RobotAtlas
12-19-2010, 03:42 PM
Fergs, you are making this too easy. ==happy==

Within 10 minutes I was able to run Anansi around and turn using "commander.py /dev/ttyUSB0" connected over XBees.
Didn't have to do a single configuration change.

One thing I remember reading somewhere that there's a way to set robot to use a different gate.
Default gate is pretty slow.

I tried adding
self.sendPacket(128,128,128,128, BUT_L6) #AB
to the end of def __init__(self, parent, ser):

But it didn't work. I think I've seen somewhere how to do it, but can't find where.
We have so much stuff on this Forum. I feel just ArbotiX with ROS threads must be more than 200 pages.
It's hard to find what you are looking for. That's why we have the same questions asked multiple times.

Does or does not ArbotiX continuously monitor battery level?
If yes, how do I know it's low?
I thought I read somewhere that it checks voltage on each power up, but I don't know what it does if level is too low.

To not to risk ruining battery, I connected battery monitor purchased from Trossen directly to Dynamixel bus. It should be the same power as battery, right?

lnxfergy
12-19-2010, 06:25 PM
Fergs, you are making this too easy. ==happy==

Within 10 minutes I was able to run Anansi around and turn using "commander.py /dev/ttyUSB0" connected over XBees.
Didn't have to do a single configuration change.

Great!.


One thing I remember reading somewhere that there's a way to set robot to use a different gate. Default gate is pretty slow.

I tried adding
self.sendPacket(128,128,128,128, BUT_L6) #AB
to the end of def __init__(self, parent, ser):

It depends on the firmware installed. The hex firmware (lines 53-58) show the following:



if(command.buttons&BUT_R1){ gaitSelect(RIPPLE_SMOOTH); multiplier=RIPPLE_SPEED;}
if(command.buttons&BUT_R2){ gaitSelect(AMBLE_SMOOTH); multiplier=AMBLE_SPEED;}
if(command.buttons&BUT_R3){ gaitSelect(RIPPLE); multiplier=RIPPLE_SPEED;}
if(command.buttons&BUT_L4){ gaitSelect(AMBLE); multiplier=AMBLE_SPEED;}
if(command.buttons&BUT_L5){ gaitSelect(TRIPOD); multiplier=TRIPOD_SPEED;}
if(command.buttons&BUT_L6){ gaitSelect(TRIPOD); multiplier=TOP_SPEED;}
So pressing L6 would normally put the robot into Tripod gait at top speed. Your code should be working -- unless BUT_L6 is defined incorrectly -- I'll try to look into it.


I think I've seen somewhere how to do it, but can't find where.
We have so much stuff on this Forum. I feel just ArbotiX with ROS threads must be more than 200 pages. It's hard to find what you are looking for. That's why we have the same questions asked multiple times.An ArbotiX wiki is on my list of things to look into, but it just hasn't happened yet.



Does or does not ArbotiX continuously monitor battery level?
If yes, how do I know it's low?
I thought I read somewhere that it checks voltage on each power up, but I don't know what it does if level is too low.Again, this is a function of the installed program/firmware. The hexapod code does appear to have voltage check at startup built in, but does not continuously check the voltage at runtime. See lines 27-34 of the sketch:



// wait, then check the voltage (LiPO safety)
delay (1000);
float voltage = (ax12GetRegister (1, AX_PRESENT_VOLTAGE, 1)) / 10.0;
Serial.print ("System Voltage: ");
Serial.print (voltage);
Serial.println (" volts.");
if (voltage < 10.0)
while(1);
See http://groups.google.com/group/robocontroller/browse_thread/thread/43ba933664359b9e for more info on voltage monitoring.


To not to risk ruining battery, I connected battery monitor purchased from Trossen directly to Dynamixel bus. It should be the same power as battery, right?Yep.

-Fergs

RobotAtlas
12-19-2010, 07:21 PM
It depends on the firmware installed. The hex firmware (lines 53-58) show the following:



if(command.buttons&BUT_R1){ gaitSelect(RIPPLE_SMOOTH); multiplier=RIPPLE_SPEED;}
if(command.buttons&BUT_R2){ gaitSelect(AMBLE_SMOOTH); multiplier=AMBLE_SPEED;}
if(command.buttons&BUT_R3){ gaitSelect(RIPPLE); multiplier=RIPPLE_SPEED;}
if(command.buttons&BUT_L4){ gaitSelect(AMBLE); multiplier=AMBLE_SPEED;}
if(command.buttons&BUT_L5){ gaitSelect(TRIPOD); multiplier=TRIPOD_SPEED;}
if(command.buttons&BUT_L6){ gaitSelect(TRIPOD); multiplier=TOP_SPEED;}
So pressing L6 would normally put the robot into Tripod gait at top speed. Your code should be working -- unless BUT_L6 is defined incorrectly -- I'll try to look into it.


Definitions are fine: 32 in Python and 0x10 in C.
I placed tha command in here:

def onClose(self, event):
self.timer.Stop()
self.sendPacket(128,128,128,128, BUT_L6) #AB

and it works (once I exit once).

Man, it goes fast!!!
I'm starting to regret I didn't use Turbo-lock when assembling.

RobotAtlas
12-28-2010, 03:08 PM
I tried putting Kinect on top to see if weight and size is suitable for this configuration:

http://www.youtube.com/watch?v=QcCHKK81v6c

I'm thinking of removing middle legs and using 2 servos for pan/tilt of Kinect. The post on which Kinect is mounted is way too unstable for a walker like this.

Zenta
12-29-2010, 12:52 AM
Interesting, what's the total weight of the robot with the Kinect? Did you also try the tripod gait?

DresnerRobotics
12-29-2010, 12:05 PM
It should carry a Kinect no problem, I think what he's saying is that the default mount of the Kinect is likely too unstable for it to be mounted on a mobile walking platform, and thus he's looking at using an AX-12 pan/tilt assembly instead.

RobotNV- I'd not recommend removing the middle legs. The PhantomX hexapod is too big for it to walk stably as a quadrupod.

RobotAtlas
12-29-2010, 12:07 PM
I still need to put a FitPC2 on it to make weight test more realistic. Also USB cable on Kinect is _very_ long, but I'm a little uneasy about cutting it off just yet. Also Kinect is pretty big in size. I might have to take the plastic body off.
Befo I do that though, I'll wait until I get my PSDK5 (from PrimeSense, similar to Kinect, but no extra power supply is required and it's smaller). It should arrive any time now. Then I'll post an update.

RobotAtlas
12-29-2010, 12:20 PM
The PhantomX hexapod is too big for it to walk stably as a quadruped.

Can you explain why is that? It's just a little longer (wider?) than quadruped - does it really make such a big difference in walking? I'm going to find this out myself anyways. See my post in PhantomX thread soon. But your explanation would be greatly appreciated.

I do love hexapod's stability and do agree that switching to quad is not a great idea for Anansi.
I'm also concerned about payload capacity of 4 legs instead of 6.

I think a better solution would be to cut off upper parts of tibias on at least 2 front legs. Those parts are for aesthetics only, but they prevent putting wide sensors on top. of hexapod.

lnxfergy
12-29-2010, 01:03 PM
Can you explain why is that? It's just a little longer (wider?) than quadruped - does it really make such a big difference in walking? I'm going to find this out myself anyways. See my post in PhantomX thread soon. But your explanation would be greatly appreciated.

I would have to agree -- if you go quad, you have to go smaller footprint as well (especially when it's loaded up with a bunch of extra weight). It mainly has to do with the torque requirements. When your legs are that far out, you create a longer lever arm -- and this raises the torque requirements.

You'll also probably find that you can't really make a heavily weighted quad walk with a ripple gait (without serious feedback and balancing, ala "littledog project")-- the bot falls over quite severely.

-Fergs

darkback2
12-29-2010, 03:09 PM
Can you explain why is that? It's just a little longer (wider?) than quadruped - does it really make such a big difference in walking?

I think it has to do with the "margin of stability" issue. With a lizard style quadruped the legs are splayed out to the sides of the robot. The longer it is, the narrower the margin of stability becomes, and the more tippy the robot will be. It becomes more and more difficult to balance the robot because it becomes more and more difficult to shift the COG into the margin of stability.

Draw a triangle between the legs that are on the ground. You have to get the COG into that triangle. If you are lifting 2 legs in a dynamic gate, then you draw a line between the two legs that are on the ground. The COG has to be somewhere on that line.

This is all further complicated by dynamic loads, and the weight of the robot. this is why Charlie's back legs always dragged on the ground, and Squidword needed a really fast gait and bigger feet in order to move around at all.

At least that is my understanding of it all.

Hope this helps