PDA

View Full Version : pypose problems



Shredder
02-19-2011, 12:38 AM
Hi guys.. I got my arbotix setupand working with the xbee. I have a couple issues I would like to ask about. My bioloid is a humanoid with 25 servos.

1. Random servos not capturing. I'll hit capture, and random servos wont capture. I hit capture again and it gets them all. Is this normal?

2. Setting posses doesnt seem to work most of the time. If I have the project set to 25 servos it wont ever set. It just replys "Fail Read" 4 times I think then doesnt do anything. I tried a couple different servo numbers to test things. at 20 servos it captured. My waist twist servo is 19, when I set the pose, the waist would twist 90 degrees (from what I can tell.. it might just be going to some random pose but it always seemed to be to the same side). So I press capture and capture the pose.. then I press set and its not like the pose that was just captured.

anyone have any ideas?

Slugman
02-19-2011, 03:18 AM
Not sure about the lack of capturing first time, but for the second - Have you had a look at the last page of the "Arbotix & Pypose" thread? Fergs answered my almost exact same question.... :wink: & his fix might fix your first problem too.
Just for the record, Fergs' fix didn't quite work for me - After I re-set the number of servos I could read them in Pypose fine, but I still don't have enough buffer for my 22 servos, so I get the same sort of response from some of the servos as you seem to be having if I try to set them to the pose. Since I am only using Pypose to quickly record servo positions, it doesn't bother me much so I didn't bother testing larger & larger buffers. :happy:

Shredder
02-19-2011, 12:25 PM
Not sure about the lack of capturing first time, but for the second - Have you had a look at the last page of the "Arbotix & Pypose" thread? Fergs answered my almost exact same question.... :wink: & his fix might fix your first problem too.
Just for the record, Fergs' fix didn't quite work for me - After I re-set the number of servos I could read them in Pypose fine, but I still don't have enough buffer for my 22 servos, so I get the same sort of response from some of the servos as you seem to be having if I try to set them to the pose. Since I am only using Pypose to quickly record servo positions, it doesn't bother me much so I didn't bother testing larger & larger buffers. :happy:

yeah I read that and did change to 25
#define AX12_MAX_SERVOS 25
in the ax12.h file, recompiled the pypose sketch and uploaded it

Shredder
02-19-2011, 12:53 PM
some more information for you guys..

if I start a new project and tell it 25 servos.
I can capture poses, but when I try to set them I get this response

setting pose...
setting pose size at 25
0xff found
0xff found
ID found: 253
length found: 2
error level found: 0
checksum found: 0
checksum computed: 255
fail read
fail read
fail read

and then sometimes the green user LED stays lit. If I try to do anything else I get a "fail read". If I reset the board I can read poses again.

Shredder
02-19-2011, 12:59 PM
if I start a project with 24 servos, I get random dropped servos on capture. Most of the time its just 1 servo, but setting them seems to work, but also had a couple random errors like couldnt find 0xff.

lnxfergy
02-19-2011, 01:37 PM
Sorry for the delay in response -- my HD died this morning, so it's been a bit hectic here.

1) Seems you have updated the PyPose firmware (with the ax12.h fix for >18 servos), so that's good. If it looks like a particular servo is causing problems, take a look at the wires and make sure they are all seated (and possibly change out a wire for a servo that seems culprit, loose/bad wires are often a cause of noise on the bus which disrupts communications).

2) How are you communicating? FTDI or XBEE? If XBEE, make sure they are properly paired (see my tutorial in the Tutorials section).

-Fergs

Shredder
02-19-2011, 01:48 PM
Sorry for the delay in response -- my HD died this morning, so it's been a bit hectic here.

1) Seems you have updated the PyPose firmware (with the ax12.h fix for >18 servos), so that's good. If it looks like a particular servo is causing problems, take a look at the wires and make sure they are all seated (and possibly change out a wire for a servo that seems culprit, loose/bad wires are often a cause of noise on the bus which disrupts communications).

2) How are you communicating? FTDI or XBEE? If XBEE, make sure they are properly paired (see my tutorial in the Tutorials section).

-Fergs

No problem man.. I know computer trouble lol
Im communicating with xbee, ordered a ftdi cause it turns out the extra one I had was a rs485.
The xbees are paired according to your tutorial.. I can double check it but I am sure they are.

I wanted to rewire some of the servos anyways so I will do that right now and test and see what happens. The reason I dont think thats the issue tho is its random servos that cant read

A question about using the FTDI header tho.. I tried this last night before geting the xbees to work, and it didnt seem to work, but should work I think.

I have the xbee explorer. Shouldnt that be able to be used as the ftdi connection as long as the xbee isnt installed? I mean it is just a FTDI FT232RL chip right? I installed two pin headers in the holes that would allow it to be placed in a bread board. Shouldnt I be able to connect those pins to the ftdi pins on the arbotix and test with it? As long as both xbees are not installed?

Shredder
02-20-2011, 11:16 PM
Hey guys, just an update..
I saw the thread here about using the USB2Dynamixel so I tried that. Pypose works fine after I changed the settings. All dynamixels capture and set no problem. Tho I cant get the sequence editor to play anything back. I click run and I get a lot of fail reads back.
Sending pose midstand to position 1
Fail Read
Sending pose squat to position 0
Fail Read
Sending pose stand to position 2
Fail Read
Sending Sequence: [0, 244, 1, 1, 2, 244, 1, 255, 0, 0]
Fail Read
Fail Read

So i guess until I find out if I can use my xbee explorer as a FTDI, then I just have to wait for my normal ftdi to get here to find out if its the arbotix or the xbee.

Shredder
02-22-2011, 09:25 PM
Another update..
Got my FTDI adapter today.

so here is how things stand right now
I tried all this with both of these in ax12.h (not at the same time, compiled and uploaded sketch then tested)
#define AX12_MAX_SERVOS 25
#define AX12_MAX_SERVOS 26

FTDI and XBee
with the project set to 24 dynamixels:
captures poses, sets poses, sequence editor works
with the project set to 25 dynamixels:
captures poses, "Fail Read" on everything else

the xbee still drops random servos on capture.

my battery died before I got to test the usb2dynamixel, but I did some testing last night and I am pretty sure it was the same case.
I did test the usb2dynamixel on dynamixel ID 25 before I did the other testing and it worked just fine thru the dynamixel wizard software from robotis.

So right now it appears to me to be a bug in pypose.. I have tested 3 different interfaces, uploaded sketches with different max servos set.
So has anyone tried pypose with more than 24 dynamixels?

I do have a HUV 6axis IMU and a AXS1 on the bus also, after the batter charges I'll try taking those out and see what happens.

lnxfergy
02-22-2011, 09:40 PM
Hey guys, just an update..
I saw the thread here about using the USB2Dynamixel so I tried that. Pypose works fine after I changed the settings. All dynamixels capture and set no problem. Tho I cant get the sequence editor to play anything back. I click run and I get a lot of fail reads back.

Sequences won't work with anything but a real ArbotiX, as the interpolation is done onboard the ArbotiX for increased smoothness.

-Fergs

lnxfergy
02-22-2011, 10:07 PM
FTDI and XBee
with the project set to 24 dynamixels:
captures poses, sets poses, sequence editor works
with the project set to 25 dynamixels:
captures poses, "Fail Read" on everything else

Ok, looking through, I think I just came up with another point of limitation, this in pypose.pde:



unsigned char params[50]; // parameters
I suggest changing the 50 to a higher number -- it has to be at least MAX_SERVOS * 2 + 1, so 24 would be the current max.



the xbee still drops random servos on capture.This, sounds like you still have an XBEE setup issue. Make sure you do in fact have each servo with a different ID, and the DL of each pointing at the other (I know several people have given both XBEEs the same ID/DL and had some communications, but many dropped packets).

-Fergs

mannyr7
02-22-2011, 10:43 PM
This, sounds like you still have an XBEE setup issue. Make sure you do in fact have each servo with a different ID, and the DL of each pointing at the other (I know several people have given both XBEEs the same ID/DL and had some communications, but many dropped packets).

-Fergs

I can vouch for this errror. I looked over my Xbee settings numerous times, which were totally wrong, yet still had probably 75% good communication.

lnxfergy
02-22-2011, 10:46 PM
I can vouch for this errror. I looked over my Xbee settings numerous times, which were totally wrong, yet still had probably 75% good communication.

Yeah, I have no idea how it works *at all* -- but it does seem to work with somewhere between 25 and 50% error.

-Fergs

Shredder
02-22-2011, 11:15 PM
Ok, looking through, I think I just came up with another point of limitation, this in pypose.pde:



unsigned char params[50]; // parameters
I suggest changing the 50 to a higher number -- it has to be at least MAX_SERVOS * 2 + 1, so 24 would be the current max.

This, sounds like you still have an XBEE setup issue. Make sure you do in fact have each servo with a different ID, and the DL of each pointing at the other (I know several people have given both XBEEs the same ID/DL and had some communications, but many dropped packets).

-Fergs

That did it! I set it to 55 as I have 2 more dynamixels I am going to add eventually.
It is now working with the FTDI.
Now that one issue has been eliminated I can move onto figuring out the XBee issue since I know the dynamixels and the arbotix work!

Thanks!

Edit:
That seemed to fix the XBee issue also!! it seems to be working 100% now!!!!