PDA

View Full Version : Arbotix & PyPose



Suicidal.Banana
10-16-2009, 02:54 PM
Since there wasn't a thread about PyPose i made one, if at some moment there is a 'official' PyPose thread, any admin feel free to merge

Im one of the lucky ones that owns a Arbotix, but im having some issue at the very end of the GettingSetup (http://code.google.com/p/arbotix/wiki/GettingSetup) page.
Im not sure if its a issue with PyPose or Python, but it comes down to PyPose not being able to communicate with the board, below a summary of what i've done, and what it errors;

- I started downloading everything ofc, Arduino software, Arbotix distro, Python, wxPython & PySerial.
- Installed in that order, applyd changes to Arduino's boards.txt and programmers.txt to support my 'Pololu USB Programmer' & the Arbotix board ofc (also in order of sayd guide)
- Rebooted, powered the board, connected it using the 'USB Programmer', using Arduino i uploaded the pypose sketch, which uploads fine (so there is connection) So far so good.
- Now i start up PyPose (double-clickin 'PyPose.py') opens a cmd prompt (Python) which tells me 'PyPose Starting...', then PyPose starts.
- I go 'Project->new', Type 'Torso' for the name, and set 14 servos, PyPose updates its pose editor sliderpane to hold 14 sliders, i go to 'config->port' and set COM3 to be the com port (its the only one, use same for Arduino, which isn't running anymore at this point) PyPose informs me 'Opening port: COM3' and in the bottom right of the app it states '[email protected]'
- Now if i press 'config -> test' it returns the below:

Opening port: COM3
Oxff NOT found, restart: 253
Oxff NOT found, restart: 253
Oxff NOT found, restart: 253
Oxff NOT found, restart: 253
Oxff NOT found, restart: 93
Oxff NOT found, restart: 213
Fail Read Anything i try besides 'config->test' (relax/capture/set) also (obviously) fails and errors.

I've already made sure the changes to boards.txt and programmers.txt were saved, and that i installed PySerial, and that i have the latest version of all "py-apps", Im running a stripped down Windows XP SP3 on a decent (dual core ~8 months old) lappy, but like the Arduino software shows, COM connections are functioning.

If any1 with knowledge of Python or PyPose could tell me how to overcome that error that would be greatly appreciated, thanks in advance.

lnxfergy
10-16-2009, 03:03 PM
How are you connected to the board? XBEEs or FTDI cable? If using XBEEs, are they paired correctly?

(If I'm reading you correctly, you are trying to use an ISP as a serial connect? That won't work).

-Fergs

Suicidal.Banana
10-16-2009, 03:11 PM
Heys Inxfergy , that was fast :D
Im connected using this (http://www.trossenrobotics.com/p/Orangutan-USB-AVR-Programmer.aspx) USB AVR programmer, didnt dive into the use of the XBEE's ive got with it yet, should i? or can it work over that cable
Thanks

Adrenalynn
10-16-2009, 03:15 PM
Don't want to step on Fergs' toes here, but that's a programmer, not a serial cable.

You need either an FDDI Serial Cable or go "over the air" for control. That device you have is for uploading programs (burning) the chip.


[Edit: EEK! Did I really write "FDDI"? Sorry! Thanks for being gentle, Fergs. :) Mea Culpa ] (FDDI is Fiber Distributed Data Interface, the transposition of which tells you what I tend to work on these days. . .)

lnxfergy
10-16-2009, 03:17 PM
Don't want to step on Fergs' toes here, but that's a programmer, not a serial cable.

You need either an FDDI Serial Cable or go "over the air" for control. That device you have is for uploading programs (burning) the chip.

Exactly right. Thanks Adrenalynn. I'll update the docs to make that more explicit.

-Fergs

Suicidal.Banana
10-16-2009, 03:17 PM
Ah okay, then thats the 'problem' hehe, my mistake, will use the XBEE's instead

lnxfergy
10-16-2009, 03:26 PM
Basically, for a little background, the FTDI or XBEEs provide a serial link between your PC and ArbotiX. The ISP has a little AVR on it that takes commands through a serial port, and programs the FLASH on the ArbotiX using an SPI link and a special protocol.

Arduino users typically like to use an FTDI chip/cable and a bootloader (basically its a minimal version of the same software that runs on the ISP). The upside is that you can program and communicate over the one FTDI chip, which saves money. The downside is: if your bootloader gets corrupted, you'll need an ISP to fix it. You also lose a little space on the chip to the bootloader. My biggest gripe though is the implications of auto-reset (the auto reset on the FTDI is needed for programming, and typically it resets your robot every time you plug in the cable).

Now, given that most ArbotiX users are going to have an XBEE wireless link, the FTDI cable is sorta not needed, and ISP + XBEE setup is far better (If you were to use an FTDI cable with XBEE, you'd have to remove the XBEE each time you want to program the board, and while you can upload code over XBEE, I wouldn't dare do it unless you have an ISP on hand, for the event when the connection fails and the bootloader gets frigged up).

-Fergs

Suicidal.Banana
10-16-2009, 03:41 PM
Okay good to know, that for that explanation, i've got the XBEE running, i get a new com port, COM4, but when i select that and test, Python only gives me

PyPose starting...
Opening port: COM4
Fail ReadI've unplugged the ISP, but that didnt change anything, anything else im missing? the manual doesnt really adress the XBEEs and im totally new to this stuff

Edit: Andrew advised me to get XCTU to change baud rate if its needed ("you might need to set the Xbees to 38400 baud, they might be set to 115k"), downloading that atm

lnxfergy
10-16-2009, 03:50 PM
Andrew advised me to get XCTU to change baud rate if its needed ("you might need to set the Xbees to 38400 baud, they might be set to 115k"), downloading that atm

Yep! Little oops there. PyPose operates at 38400. Changing the baud isn't hard, I have a tutorial here: http://forums.trossenrobotics.com/tutorials/how-to-diy-128/xbee-basics-3259/

Also, thanks for the great feedback here, this is a great example of how to get the most out of support, the issue was very well described.

-Fergs

Suicidal.Banana
10-16-2009, 03:56 PM
no no, thank u guys :)
might be good to add that too the GettingSetup (http://code.google.com/p/arbotix/wiki/GettingSetup)? Looking at the PyPose (http://code.google.com/p/arbotix/wiki/PyPose) page i see it does say so there, so really i should have just read that page better, but still :P

lnxfergy
10-16-2009, 04:00 PM
Yeah, I'll be updating Getting Started later tonight. I'll also be putting up the new Hardware Manual later this weekend. I'm actually sitting in class right now....

-Fergs

Suicidal.Banana
10-16-2009, 04:30 PM
Yay its working, using your xbee tutorial, nice. and yea timezones fail at internets
Thanks again ^___^

DC Robotic
10-16-2009, 09:48 PM
Fergs,

I'm having trouble communicating with the arbotix also. I'm sure it's because I have never used an Arduino before. I have followed the tutorial and am using a Polou orangutan ISP for which I have modified the boards and programmer.txt files. When I go to upload pypose using ardunio 0017 I get the following (errors)? in red at the bottom. The program never indicates anything and continues to display "uploading to I/O board". What have I missed? Have a bot, If I only had a brain....

java.lang.NumberFormatException: null
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at processing.app.Preferences.getInteger(Preferences. java:822)
at processing.app.Sketch.size(Sketch.java:1436)
at processing.app.Sketch.exportApplet(Sketch.java:142 6)
at processing.app.Sketch.exportApplet(Sketch.java:138 2)
at processing.app.Editor$45.run(Editor.java:2165)
at java.lang.Thread.run(Unknown Source)


Followed your xbee tutorial and I am pretty sure I have the xbee working, though I get the same error as sucucidal banana described in his first post. I have configured them for correct baud and they see each other in X-CTU. I'm assuming my problem is in getting a good pypose upload to the arbotix.

Thanks, really looking forward to using the arbotix.

Darrell

lnxfergy
10-17-2009, 01:16 AM
Darrell,

After investigating the error, tracing through all that Java code, are you sure you have the following line in your boards.txt:

arbotix.upload.maximum_size=65536

Since thats looks to be exactly the parameter the code is trying to find, and says it's not there. I've checked, and it looks like its in both the boards.txt and boardsISP.txt files in my release.

-Fergs

DC Robotic
10-17-2009, 08:54 AM
Fergs,

Everyting, including wireless xbee, is working now. Thanks for the suport! I must have missed a copy and paste originally. Where I got lost in the directions was in the copying and modifying the boards.txt to set up the programmer. Re-formatting the instructions based on programmer might help. For instance.

If you are using XXX to program your arbotix

DC Robotic
10-17-2009, 09:03 AM
Whoops, accidentially hit the post button

if you are using XXX to program your Arbotix.
1 .....
2 .....
if you are using YYY to program your Arbotix.
1 .....
2 .....

More verbose, as some of the steps are repeated, but much easier for a noob like me to follow.

Just trying to help from an Ardunio noob perspective. The Arbotix is exactly what I was looking for in a controller and I'm excited to dig into my project now that I have it configured.

Thanks again Fergs,

-Darrell

lnxfergy
10-17-2009, 09:25 AM
Yep Darrell, we'll be reworking docs over the next few weeks. I'm really working on final testing and repairing a few MacOSX issues so we can go from rc1 to release 1.0 with arbotiX/PyPose, and once that's done, the docs will be getting a very big facelift.

-Fergs

Suicidal.Banana
10-17-2009, 01:14 PM
Snap, i just noticed PyPose didn't save my first (rather scary) sequence :(
Wanted to make a vid, no ppr file, checking it now, it errors this when i save:

Traceback (most recent call last):
File "D:\arbotix-software-rc1\pypose\PyPose.py", line 211, in saveFileAs
self.saveFile()
File "D:\arbotix-software-rc1\pypose\PyPose.py", line 206, in saveFile
self.project.save(self.filename)
TypeError: 'bool' object is not callable
Ive tried filename with only lowercase, only uppercase,no symbols, including .ppr and more, any ideas?

lnxfergy
10-17-2009, 01:31 PM
Nope, that's a bug that appears to have creeped in at the last minute. I've uploaded RC1a, the only files changed are pypose.py and project.py, so if you replace those, you should be good to go.

-Fergs

Suicidal.Banana
10-17-2009, 02:46 PM
Thanks for that, now i saves (and loads) fine :D

Edit:
Actually, this version often reports not being able to read servos, while it can write to them (relax&set work)
Could be due to some cable getting lose in the chest, will take it apart tommorow (when theres better light and less alcohol)

A log; starting, loading file, relaxing servos, i moved all servos (by hand, not the sliders) captured (could not read servos: 1, 13)& set


PyPose starting...
Opening port: COM4
Opening: C:\Documents and Settings\BananaBotControl\My Documents\BananaTorso.ppr

PyPose: relaxing servos...
Oxff found
Oxff found
ID found: 1
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 2
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 3
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 4
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 5
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 6
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 7
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 8
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 9
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 10
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 11
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 12
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 13
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 14
Length found: 2
Error level found: 0
Checksum computed: 255
Capturing pose...
Oxff NOT found, restart: 210
Oxff NOT found, restart: 0
Oxff NOT found, restart: 0
Oxff NOT found, restart: 0
Fail Read
Read Failed: Servo ID = 1
Oxff found
Oxff found
ID found: 2
Length found: 4
Error level found: 0
Parameter found: 92
Parameter found: 2
Checksum computed: 255
Oxff found
Oxff found
ID found: 3
Length found: 4
Error level found: 0
Parameter found: 7
Parameter found: 2
Checksum computed: 255
Oxff found
Oxff found
ID found: 4
Length found: 4
Error level found: 0
Parameter found: 210
Parameter found: 1
Checksum computed: 255
Oxff found
Oxff found
ID found: 5
Length found: 4
Error level found: 0
Parameter found: 113
Parameter found: 1
Checksum computed: 255
Oxff found
Oxff found
ID found: 6
Length found: 4
Error level found: 0
Parameter found: 123
Parameter found: 2
Checksum computed: 255
Oxff found
Oxff found
ID found: 7
Length found: 4
Error level found: 0
Parameter found: 9
Parameter found: 2
Checksum computed: 255
Oxff found
Oxff found
ID found: 8
Length found: 4
Error level found: 0
Parameter found: 2
Parameter found: 2
Checksum computed: 255
Oxff found
Oxff found
ID found: 9
Length found: 4
Error level found: 0
Parameter found: 37
Parameter found: 1
Checksum computed: 255
Oxff found
Oxff found
ID found: 10
Length found: 4
Error level found: 0
Parameter found: 206
Parameter found: 2
Checksum computed: 255
Oxff found
Oxff found
ID found: 11
Length found: 4
Error level found: 0
Parameter found: 64
Parameter found: 3
Checksum computed: 255
Oxff found
Oxff found
ID found: 12
Length found: 4
Error level found: 0
Parameter found: 183
Parameter found: 0
Checksum computed: 255
Oxff NOT found, restart: 198
Oxff found
Oxff NOT found, restart
Oxff NOT found, restart: 4
Oxff NOT found, restart: 0
Oxff NOT found, restart: 183
Oxff NOT found, restart: 0
Oxff NOT found, restart: 56
Fail Read
Read Failed: Servo ID = 13
Oxff found
Oxff found
ID found: 14
Length found: 4
Error level found: 0
Parameter found: 2
Parameter found: 2
Checksum computed: 255
Setting pose...
Oxff found
Oxff found
ID found: 1
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 2
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 3
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 4
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 5
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 6
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 7
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 8
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 9
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 10
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 11
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 12
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 13
Length found: 2
Error level found: 0
Checksum computed: 255
Oxff found
Oxff found
ID found: 14
Length found: 2
Error level found: 0
Checksum computed: 255


Edit2:
I've noticed that if i bash the capture button a bunch of times, it tends to read all servos, like first press it cant read 6 servos, second press it cant read 5, 3rd press it cant read 3 etc

lnxfergy
10-18-2009, 09:36 AM
Is it the same servo(s) each time? If so I'd check the wiring. The log you posted looks like the arbotix completely couldn't talk to ID#1, and for #13 it appears that a byte was missed either on the arbotix or pypose.

Just for a few other parameters: what OS? You're using an XBEE+explorer, right?

-Fergs

Suicidal.Banana
10-18-2009, 09:57 AM
I've now checked all hard-to-reach-cables, they were/are all properly&fully plugged in.
Running Win Xp Sp3 ('nlited', stripped out some unneeded stuff)
Using XBEE's to connect the arbotix to PyPose.

Theres one thing im wondering about, wich might be the cause, i didn't really pay attention to the order of the servo id's, in the chest/the head are nicely from 1 to 4, but the arms start at 11 & 12 in the shoulder, meaning that id 1 connects to id 11 and 2 to 12 (and 1 to 2, 2 to 3, 3 to 4) does that matter?

Edit: also, does it matter how i connect the 'dynamixels'? atm i connect the chest trough 1 port, and the arms trough the other 2 ports, inside the chest i use the little board with 6 dynamixel sockets

Adrenalynn
10-18-2009, 01:11 PM
Well, it's going to confuse the heck out of you, at least it would me, if I have to remember that my shoulder is ID 11 and my elbow is ID 5, for example. Or am I missing what you're getting at?

The ID 1 slider in PyPose is going to move Servo ID 1. You can always reset the servo IDs though.

Suicidal.Banana
10-18-2009, 01:38 PM
well its not that confusing i was just wondering if it would cause the 'not beeing able to read servos'

lnxfergy
10-18-2009, 04:29 PM
What sort of specs does your computer have? Processor speed? Are you running a lot of programs in the background?

I've spent the last hour trying to re-create the issue you have. Basically, the serial port for PyPose is timing out before the data gets read. The only way I could recreate this, was by having LOTS of extra stuff running in the background (like a video and audio stream going at the same time, and another python program computing an infinite series of Fibonacci numbers).

Regardless, there will be a patch with longer time-out settings later tonight, I'm running final checks on a few other bug fixes before I release the whole thing.

-Fergs

Adrenalynn
10-18-2009, 05:02 PM
Didn't I have to change my timeout during the beta phase, Fergs? I'm thinkin' I did.

Suicidal.Banana
10-18-2009, 06:03 PM
Heys, a quicky runup of the laptop's specs (if u want me to run some aiwa32 or similar tell me)
Intel Pentium Dual CPU T3200 @ 2.00Ghz
1,99Gb RAM, 2046 MB Virtual memory
For connections only a few usb2 ports a firewire port and mic/headphone, running the laptop with powercord so i can be sure that it puts out full needed power to usb/XBEE, XBEE plugged into what windows considers the first usb socket

The windows (xp sp3) install is pretty new, hardlly installed any software, it runs about 25 processes ~1% CPU usage while typing this, running firefox with a few open tabs, at time time of the earlyer posts i was only running firefox with 1 tab in the bg, and only 1 instance of pypose, no other python programs.

Regarding timeouts; if i don't use the connection for a few minutes (say, combine some poses in a sequence) it trows alot of Fail Read when doing anything over the connection, is that what u meant too?

EDIT:
Also, if i may, a small request for PyPose, could you add a 'Delta-T' input area near the set button, to change setting speed? because it can be kinda violent atm depending on the difference between current and new pose. just a thought :)

lnxfergy
10-18-2009, 08:36 PM
Didn't I have to change my timeout during the beta phase, Fergs? I'm thinkin' I did.

You are very right. And I thought that change HAD made it into the main branch, but upon further inspection, not so.

The lowered timeout threshold was really only needed by the 'list servos' command in the terminal. The terminal tool now changes the timeout when running this command, and then resets it to the higher value. A higher timeout can cause longer delays during capture.


Heys, a quicky runup of the laptop's specs ....

EDIT:
Also, if i may, a small request for PyPose, could you add a 'Delta-T' input area near the set button, to change setting speed? because it can be kinda violent atm depending on the difference between current and new pose. just a thought :)

Yeah, clearly not that the PC is overloaded, but I'm guessing the USB/serial port is running slightly slower somewhere. I actually hadn't realized just how low the threshold was still (it should have been bumped back up a while ago). A new release is up on the google code site, note that it's not shown on the front page right now, but it is under the downloads tab. V1.0a has a higher threshold to start with, and will automatically bump it up if captures are failing.

As for delta-T on the pose tab... it's in the works, but it's not quite as easy as it sounds (or at least the easy way constricts the program more than I'd like). My original intent was that the Pose Editor could be used with the arbotiX, or any other pass through (such as the USBDynamixel). There is a driver for the USBDynamixel, but no GUI way to select it yet. Basically, when you click set/capture on the Pose Editor, PyPose queries/sets each servo individually, there's no speed control. Sequences on the other hand would basically be unsupported by a USBDynamixel. When you play back a sequence, the entire set of poses and the sequence are downloaded to the arbotiX, which then runs them as if they were burnt into the flash as your own exported program. A sequence playback through PyPose is identical to what you'll get if you export and follow the sample code for playback. I personally rarely use the "set" button, I capture poses, make sure all the capture went OK, then jump right over to the sequence editor (or if I'm doing a quad, I export, parameterize in code, and go to town).

-Fergs

Suicidal.Banana
10-19-2009, 03:19 AM
Heys,

Thanks for the new version, cant test atm but will later today (do i understand correctly that this new download is also rc1a?)
Cool that you will also support the USB2Dynamixel and possibly other connections/boards in the future, and that your thinking about/working on a 'Delta-T' input area for set.

I mostlly use the sequencer too, but im using the arbotix on a torso (http://forums.trossenrobotics.com/showthread.php?t=3614), wich has quite some more dof then 'your average quad', and seeing how it can pretty easily slam into its own arms (especially when not/misread a few servos) i like to test each pose before making it a sequence, since well, it already tore off part of my finger, wouldnt surprize me if it can break off a arm, ive come to the conclusion that ax-12's are quite scary when u get beyond the 9.6v

Edit:
Back home now, just 'hooked up' svn and downloaded, with the new 1.0a it does improve, but im starting to think its something to do with the servo, since even if the timeout value is at 16, and it keeps failing to read servo id 13, ima take it apart again, maybe the cable is damaged or maybe its the servo, dunno yet, the timeout did help alot though, thanks for that :D
will report back asap if i've found anything wrong with servo 13 so u can be sure to get my 'issue' of the list

Edit2:
Took the whole thing apart, checked all cables under good lighting, found 2 cables with small 'dents' in them, replaced those, no change.

Went on and investigated further, i unplugged servo 13 from the chain, attached it to the cm5, ran motion editor, and well, idk how, but the servo had id 1 instead of 13?!
I dont recall ever changing the id of any of the servos yet, luckily after looking trough the manual a bit i managed to change it to 13 (ID & cid, dunno if cid matters) and now it works flawlessly without ever changing timeout, WOO! (and BOO @ sayd servo)

So yea, issue solved, sorry about that, i just didn't know i was using two ID 1's :confused: (i know, i fail for not checking sooner)

lnxfergy
11-14-2009, 04:46 PM
Just a note, since we were discussing delta-T on the Pose Editor -- We've just released V1.0b, and it includes a port driver overhaul, and thus delta-T in the Pose Editor -- enjoy!

-Fergs

Suicidal.Banana
11-25-2009, 04:43 AM
Just a note, since we were discussing delta-T on the Pose Editor -- We've just released V1.0b, and it includes a port driver overhaul, and thus delta-T in the Pose Editor -- enjoy!

-Fergs

Awesome! much obliged thanks!

Suicidal.Banana
01-10-2010, 04:32 PM
Heys lnxfergy,

Can i request a PyPose Update? your prolly gon laugh, but the gui fails when i make a project with 26 servos (actually any more then 24 and the buttons at the bottom vanish) any chance to make it change too 3 columns of sliders when above 20 or something? im using 26 servos now and actually thinking of going up to 28.

Thx in advance

lnxfergy
01-10-2010, 07:40 PM
Heys lnxfergy,

Can i request a PyPose Update? your prolly gon laugh, but the gui fails when i make a project with 26 servos (actually any more then 24 and the buttons at the bottom vanish) any chance to make it change too 3 columns of sliders when above 20 or something? im using 26 servos now and actually thinking of going up to 28.

Thx in advance

Fails? As in "dies and exits" or just that you can't see it? We know about the "can't see it" problem, it's Issue #6 (http://code.google.com/p/arbotix/issues/detail?id=6) and as you can see, it has been on the books since the early beta testing -- but ya, you're the first person to *need* more than 18 or so servos.

Sounds like it's time to tackle this then. I'll take a look into it tomorrow and see how tough it would be to give us a third column, shouldn't be too bad, I can probably squeeze it into our PyPose V1.1 Beta2 release later this week.

-Fergs

Suicidal.Banana
01-16-2010, 11:05 AM
Heys,

Sorry about the delay, i forgot to check back here, sorry, yeah im thinking its that Issue #6
what i think is happening (wich corresponds with issue 6) is that the resolution is to small, the app tries to go the height at wich it fits all, prolly this goes well for however many servo sliders there are, but then python or windows notices the res and sets max size on the window.

So yea, maybe 3 columns of sliders, or (like suggested in issue and actually better fix) make the pane of sliders scroll when it gets higher then the inner window height.

I would have upped my res if i could btw, but ye, its a netbook/simple lappy
Thx in advance :D (and woo at me being the first to use this many servos on your board :P)

Suicidal.Banana
02-08-2010, 05:55 PM
Did you ever release 'PyPose V1.1 Beta2'? been looking at the google-code page every few days but nothing so far, have you moved to a different site? or just haven't had time to work on it?

Any info appreciated, thanks in advance

lnxfergy
02-08-2010, 06:58 PM
We're close. Was still doing some in-house testing, and then they released Arduino 0018... which changes a number of things about how 3rd party boards interact with the IDE, so further changes are in the works. Should be out shortly.

-Fergs

Suicidal.Banana
02-09-2010, 03:39 AM
Okays, thanks for the update :happy:

Edit 15-2: Any news?
Edit 19-2: how bout now?

lnxfergy
02-21-2010, 01:34 PM
And finally ArbotiX/PyPose has a new release. What it includes:


Support for Arduino 0018
Selection for # of columns in Pose Editor
Full NUKE support for Lizard IK
Re-ordered default servo mappings in NUKE
Relax servos at the beginning of neutral/limit captures
Move test drive button down near export
Fixed issues with sequence export

Find it at: http://code.google.com/p/arbotix/ Please be aware, Arduino 0018 changed up a few things on us -- so check out the Getting Started page on how to install -- it's a bit different, but WAY easier.

Sadly, what didn't make the cut was Mammal IK (there's a bug somewhere in the sign test, haven't found it yet). There will be another release in about 2 weeks, with some other new features we'll need, I'm hoping that Mammal IK will make that release.

-Fergs

Suicidal.Banana
02-21-2010, 05:58 PM
Nice! thanks much, will try it tomorrow (was just going to bed now)

Edit #1:
Hmm, for some reason arduino 0018 wont work.. it keeps trowing this at me:

Binary sketch size: 7760 bytes (of a 65536 byte maximum)

java.lang.NullPointerException
at processing.app.debug.AvrdudeUploader.getProgrammer Commands(AvrdudeUploader.java:97)
at processing.app.debug.AvrdudeUploader.uploadUsingPr eferences(AvrdudeUploader.java:58)
at processing.app.Sketch.upload(Sketch.java:1498)
at processing.app.Sketch.exportApplet(Sketch.java:146 5)
at processing.app.Sketch.exportApplet(Sketch.java:142 0)
at processing.app.Editor$46.run(Editor.java:2219)
at java.lang.Thread.run(Thread.java:619)
Googling got me here (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1266750869/0) and here (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1266204382/3) which both didn't really help, the first does somewhat offer a solution, but it doesnt seem to be for a usb parallel programmer, the second doesnt even mention a solution.

Any chance you could tell me what to change in 'preferences.txt' to make arduino 0018 work with the USB AVR Programmer from the kit? or is it best to watch/reply-to those threads?

Another thing that crossed my mind (probably just silly) was that maybe the arbotix isnt responding as it should to 0018 because it still has a 0017 sketch on it? (i kept 0017, and made sure there was a working upload many times, not at same time of 0018 and removing 'preferences.txt' in between)

Edit #2: Hmm i just found this (http://www.pololu.com/docs/0J17/3), this will prolly suffice, will try & edit post when im home

Edit #3: Nope that didnt do it either (the parts about 'Orangutan USB programmer' that is) but then again it was for 0012, also matching my programmers.txt with andrew didnt help, i made sure the correct 'upload.using' was set

Suicidal.Banana
02-24-2010, 07:28 AM
Any ideas? (sorry for the bump, just to mark the topic as new tbh)

lnxfergy
02-24-2010, 04:25 PM
Hmm, interesting. Apparently, I needed to do a bit more testing under Arduino 0018. Anyways: create a <sketchbook>/hardware/arbotix/programmers.txt file, with the following lines in it...

avrispmkii.name=AVRISP mkII (arbotix)
avrispmkii.communication=serial
avrispmkii.protocol=stk500v2

...for the original Pololu programmer. Save the file, restart Arduino. Instructions for other programmers are in the ArbotiX wiki (http://code.google.com/p/arbotix/wiki/GettingSetup)

And for future reference, always put up a new post -- I get no notice when a post is edited, but I will see new posts very quickly.

-Fergs

Suicidal.Banana
02-24-2010, 06:12 PM
Oh snap. :o

I had exactly that (well without '(arbotix)'), and i actually tryed adding a whole bunch of programmers in programmers.txt, but i made it in hardware/ not hardware/arbotix/

Arduino works perfect again now, and the columns thing in pypose works great, thanks again! :D

Suicidal.Banana
03-01-2010, 10:05 AM
Hmm, i dunno why, but ever since that last arduino&pypose update my bot/setup is seriously crippled, some questions;

[1] Am i right in thinking the servo limit is set at 30 or is it actually at 25 like i just heard from tybs? (edit; Tyberius told me he just guessed 25, incase u wonder where the number comes from)
[2] Could it maybe be that my bootloader got corrupted? (just wildly guessing) if so, can i fix that?
[3] Every once ina while i see pypose output details about a dynamixel with the ID 253, some leftover AX-S1 testing code perhaps??

The reason i ask the above (and only now, not sooner) is because theres some strange connection issue, pypose allows me to capture or set only once, and even then at random, so not necessarily the first time i press the capture/set button, ive already checked;


I dont have duplicate ID's (wich is why it took a while, stupid roboplus download kept timing out)



All cables are connected and in working order (tested all cables)



I've made sure the servos worked on the chain (sending my own package to change led, from w32 app, to pypose sketch (over serial), wich in turn 'forwards' it to dynamixels)

Any help is appreciated

lnxfergy
03-01-2010, 10:48 AM
[1] Am i right in thinking the servo limit is set at 30 or is it actually at 25 like i just heard from tybs? (edit; Tyberius told me he just guessed 25, incase u wonder where the number comes from)
The limit inside pypose, and the pypose sketch is set at 30. However, there is then some issue with the BioloidController library, from our wiki: "If using more than 18 servos, you will need to change AX12_MAX_SERVOS in ax12.h to increase the size of the pose buffers. Alternatively, if memory is running tight, and you are using less than 18 servos, you can change this to reduce the size of the pose buffers."


[2] Could it maybe be that my bootloader got corrupted? (just wildly guessing) if so, can i fix that?
It's possible, but if it did, you wouldn't be able to upload a new sketch (I'd suggest trying this). If you did lose the bootloader, you can restore it with an ISP.


[3] Every once ina while i see pypose output details about a dynamixel with the ID 253, some leftover AX-S1 testing code perhaps??
ID 253 is the ArbotiX itself, it's where the special commands for loading and playing sequences and poses go.

-Fergs

Suicidal.Banana
03-01-2010, 02:59 PM
First off, im a fool for not reading the wiki carefully, thats like the 5th thing you had to tell me, while i was convinced i did read the wiki carefully, im printing it out now so i can read it better, my apology's :sad:

Doing just that (changing AX12_MAX_SERVOS & re-uploading sketch) made all the odd '1-time-capture-or-set' stuff disappear, and makes it capture and relax without error, only 'set' doesn't read: (edit; after i do capture once or 2ce to 'generate' any needed timeout increase)

Setting pose...
Setting pose size at 26
Fail Read
Fail Read
Fail ReadBut ill read the printout now, so if its in there ill find it :o

Oh and forget the bootloader remark since the sketch uploaded just fine

elaughlin
06-02-2010, 09:39 PM
I searched through posts and finally got to this one where it seemed to have some of the questions I already had. I am total beginner, but I think I can do ok when I learn it once or twice. But I am having a hard time understanding the xbee/arbotix/python/arduino stuff. I know thats a lot, but please try to understand me.

I have the two xbees configured to 38400 baud rate now. So that part I think I handled. I changed the boards.txt and programmers.txt files to what they should be. I have power to my arbotix board. And now is where I get stuck.

I want to just load anything onto the arbotix board to see if I have done everything (anything) correct. So what I get from evrything on what is needed to be done, and please correct me every time im wrong.

1 - Connect Pololu ISP Programmer to Arbotix board.
2 - Open Arduino IDE and upload the code to the board (using correct port) *Which when I look at the ports when the Pololu is connected, there are 2 of them [Pololu USB AVR Programmer Programmin Port (COM 5) and Polou USB AVR Programmer TTL Serial Port (COM 4), which shoudl I be choosing?]
3 - This is where I dont really know what to do. Do I run something through Python? Do I connect the Xbees to the arbotix and USB Explorer? Do I need to input anything else? Very confused at this point.

I think I have made some progress with figuring out some pieces on my own, but I am getting lost a lot now.

If anyone could help me out that would be great, thanks.

lnxfergy
06-02-2010, 10:23 PM
I have the two xbees configured to 38400 baud rate now. So that part I think I handled. I changed the boards.txt and programmers.txt files to what they should be. I have power to my arbotix board. And now is where I get stuck.

I want to just load anything onto the arbotix board to see if I have done everything (anything) correct. So what I get from evrything on what is needed to be done, and please correct me every time im wrong.

1 - Connect Pololu ISP Programmer to Arbotix board.
Ok, sounds good so far. Just make sure you've copied over all the files into your "hardware" folder of your sketchbook as well (I'm assuming, since you've got the boards.txt and programmers.txt, that you've probably done this).


2 - Open Arduino IDE and upload the code to the board (using correct port) *Which when I look at the ports when the Pololu is connected, there are 2 of them [Pololu USB AVR Programmer Programmin Port (COM 5) and Polou USB AVR Programmer TTL Serial Port (COM 4), which shoudl I be choosing?
Should be COM5, you want the programmer, not the TTL serial.


3 - This is where I dont really know what to do. Do I run something through Python? Do I connect the Xbees to the arbotix and USB Explorer? Do I need to input anything else? Very confused at this point.
If you upload the "pypose" sketch that comes in the examples, then you can control the board with the PyPose python program. Put one xbee in the ArbotiX, the other in the explorer. Plug the explorer into the PC (find out which COM port it is). I'd suggest attaching a single servo (id 1 would be a good idea) to the ArbotiX. Power on the arbotiX, start PyPose on your desktop and try out the directions in the Getting Started of the PyPose documentation (http://code.google.com/p/arbotix/wiki/PyPose).

-Fergs

DresnerRobotics
06-03-2010, 12:49 AM
Another option is experimenting with your own basic programs to run on the arbotix, to say, move a servo using the BioloidController library. This would only require you write a program in the arduino IDE, download it to the ArbotiX, and have the Arbotix execute the code. This process does not involve PyPose, which I would personally consider the next step for someone who is learning the entire system from scratch.

elaughlin
06-03-2010, 06:11 AM
I dont need it to be pypose right now. I just want to make something work, anything work. From Arduino IDE sent to the arbotix, and see it do something. Just so I can know the steps of how everything works. Thanks Inxfergy and Tyberius.

cdraptor
07-17-2010, 06:25 PM
elaughlin

I recently got the arbotix and have just torn down my humanoid - plans to make my own quadwalker. I am not ready to mess with PyPose & NUKE quite yet. I come from a programming background mostly enterprise/web applications using ASP.NET (C#), PHP, Java - so I am dusting off the old C knowledge and working with the Arduino IDE.

Just so happens I wanted to create an Arduino sketch to work with the ax12.h/bioloid.h libraries and at the same time mess with my AX-12 servo settings. So last night I whipped out a simple sketch. It's very rough, but you should find it simple to follow and play around with. Anyway I got a kick out of dealing with strings as char* / char[] and browsing around the ax12.h and looking at the H/L register values - feels so ancient. Anyway it's fun to get back to some old school dev.

Not sure if I am going to use PyPose & NUKE, haven't gotten into Python much, more of a Java guy - so I may be working with the Java RXTX. I will be sharing anything I dabble with - code free for anyone to do whatever they want with it.




/*
Simple Serial Communication AX-12 test program - you can use this to set AX-12 positions

Chuck Durham
"cdraptor" on the Trossen Forums

Very test based serial command AX12 test program. I use this to examine the positions and tweak the AX-12s.
I wanted to create this prior to getting into the whole PyPose/NUKE

Pull up the Serial Monitor in the Arduino IDE - I am using the FTDI breakout board, so I can send commands and get
reponse from my program back. Should work with the XBee as well. Make sure when you open up the Serial monitor you
give it a few seconds to make the connection

Commands
----------------
s002<send> - This will set your AX-12 id, so any commands will work on AX-12 ID#2
o<send> - will turn off servo torque
i<send> - will turn on servo torque
0700<send> - This will call the setPosition to 700 for whatever id was last set. I do check and make sure the postion number is 1 to 1023

*/

#include <ax12.h>
#include <BioloidController.h>

// we always need to create an instance of the bioloid control, usually with baud = 1Mbps.
BioloidController bioloid = BioloidController(1000000);

int ax12;
int idx;
int idchange;
char instr[4];

int cmd;

void setup(){
Serial.begin(9600);

ax12 = 1;
idx = 0;
cmd = 0;
idchange = 0;
}

int getValue(char *inval)
{
int data = atoi(inval);

return data;
}

void loop(){



if (Serial.available() > 0)
{

int incoming = Serial.read();

//Debug
//Serial.print("[");
//Serial.print(idx);
//Serial.print("] ---> ");
//Serial.println(incoming);


// Note set cmd = 1 - when an incoming command is found to skip loading into the instr array

if (incoming == 111) // o
{
Serial.println("Torque off");
//turn off the Torque
Relax(ax12);
cmd = 1;
idx = 0;
}

if (incoming == 105) // i
{
Serial.println("Torque on");
//turn on the torque
TorqueOn(ax12);
cmd = 1;
idx = 0;
}


if (incoming == 115) // s -- servo id change sXXX (format s000 - s999)
{
Serial.println("Id change");
idchange = 1;
cmd = 1;
idx = 0;
}



if (cmd == 0) //we are not in command mode so
{

//Handle AX-12 id change
if (idx == 2 && idchange == 1)
{
instr[idx] = (char)incoming;
instr[3] = '\0';
idx = 0; // reset index for next commands

int newid = atoi(instr);

if (newid > 0 && newid < 999)
{
ax12 = newid; // this will change the id so the next command will owrk on that server ex. to set id to 5 (s005), for 15 (s015) - then send
Serial.print("AX-12 ID# set to ");
Serial.println(ax12);

idchange = 0;
}

}

// Handle AX-12 positions
else if (idx == 3)
{
instr[idx] = (char)incoming;
instr[4] = '\0';

idx = 0; // reset index for next commands

int pos = atoi(instr);
//Check to make sure the number is not too big
if (pos > 1023)
pos = 1023;
if (pos < 1)
pos = 1;

//set the bioloid position
Serial.print("setting AX-12 postion to: ");
Serial.print(pos);
Serial.print(" for ID#");
Serial.println(ax12);

SetPosition(ax12,pos);


}
else
{

instr[idx] = (char)incoming;
idx++;
}
}


cmd = 0;

}

}

Chuck Durham
"cdraptor"

DresnerRobotics
07-17-2010, 06:53 PM
Long time no see Mr. Cdraptor, nice to see you tinkering with the ArbotiX!

lnxfergy
07-17-2010, 11:56 PM
Not sure if I am going to use PyPose & NUKE, haven't gotten into Python much, more of a Java guy - so I may be working with the Java RXTX. I will be sharing anything I dabble with - code free for anyone to do whatever they want with it.

You don't need to know Python to use PyPose -- it's really just a desktop application/tool that is good for interacting with the servos, and exporting stuff to the Arduino environment. PyPose itself has pose and sequence creation tools, and everything you create gets exported into a C-header file that can be used inside the Arduino IDE, using the BioloidController library. NUKE is another tool within PyPose which exports a full Arduino sketch with your custom IK engine and gaits after going through a very short (<30min) setup routine. All of the exported stuff is in C. I'm actually not aware of anyone who's hacking around inside PyPose right now, but it is open source.

-Fergs

LinuxGuy
07-18-2010, 02:07 PM
Hmm, interesting. Apparently, I needed to do a bit more testing under Arduino 0018. Anyways: create a <sketchbook>/hardware/arbotix/programmers.txt file, with the following lines in it...
This should be <arduino-ide-path>/hardware/arbotix/programmers.txt file.

8-Dale

DresnerRobotics
07-18-2010, 02:26 PM
Actually it can be either. We haven't figured out what prompts this, but some people require it to be in the sketchbook folder, some in the arduino IDE.

lnxfergy
07-18-2010, 02:33 PM
Actually it can be either. We haven't figured out what prompts this, but some people require it to be in the sketchbook folder, some in the arduino IDE.

Well, this addition was really for the Mac crowd. The MacOSX installation is now a zipped up app -- in Arduino 0016, 0017, Mac users had to open up the zipped up app and copy in 3rd party files. For Arduino 0018, the sketchbook/hardware and sketchbook/libraries support was added to ease 3rd party installs for them (and everyone really) -- however, it seems to be finicky under some Windows installations (I've had no issues on my Linux box, or on my WinXP computer, but I've had numerous Windows XP, Vista & 7 users tell me that it only worked in the arduino-ide directories, not in the sketchbook).

-Fergs

DresnerRobotics
07-18-2010, 02:37 PM
Yup, and on the same accord my XP box wants the hardware folder in the Arduino IDE folder, while my Win 7 box wants it in the Sketchbook folder. I've seen it both ways during various user support too, with the last two people I've helped needing it in the Sketchbook folder. One XP and one Win 7, I believe. I haven't figured out a pattern, it's really weird.

cdraptor
07-18-2010, 02:46 PM
Andy

It's good to be back tweaking with robotics again - well at least for the summer I have carved out a bit of time anyway. I guess you guys at Trossen can figure out when I am at it with all the orders. I would save myself a bunch if I figured out all the stuff I need/want, but most of the time I come up with ideas. I really like the whole Arduino concept and the work with the Arbotix so far has worked out very well. BTW I saw that video of your quadwalker - what Dynamixal did you use in that, man that thing can move around. I am starting out using up the AX-12s I have here, but I get the feeling I am gonna be upgrading those before long.

Fergs

Yeah PyPose/NUKE seem pretty functional, but since you have it out there I gotta dig around and see how things work. I would like to thank you for the awesome arbotix board and all the work you have put into the software.

Chuck Durham
"cdraptor"

lnxfergy
07-18-2010, 02:51 PM
Andy
BTW I saw that video of your quadwalker - what Dynamixal did you use in that, man that thing can move around. I am starting out using up the AX-12s I have here, but I get the feeling I am gonna be upgrading those before long.


He was using RX-64s, which are a bit faster than AX-12s -- but don't let the AX-12s fool you, they can go pretty fast. Several lighter payload AX-12 quads running NUKE have been in the 50-70cm/s range for forward walking speed, most should be able to get 30cm/s without issue (out of the box, the NUKE default gait is a bit slower, 10cm/s tops, but it's very easy to increase this by changing one or two lines inside the sketch -- we keep it slower so that people can find any issues before they start banging servos together and busting stuff).

-Fergs

DresnerRobotics
07-18-2010, 02:59 PM
Andy

It's good to be back tweaking with robotics again - well at least for the summer I have carved out a bit of time anyway. I guess you guys at Trossen can figure out when I am at it with all the orders. I would save myself a bunch if I figured out all the stuff I need/want, but most of the time I come up with ideas. I really like the whole Arduino concept and the work with the Arbotix so far has worked out very well. BTW I saw that video of your quadwalker - what Dynamixal did you use in that, man that thing can move around. I am starting out using up the AX-12s I have here, but I get the feeling I am gonna be upgrading those before long.

Fergs

Yeah PyPose/NUKE seem pretty functional, but since you have it out there I gotta dig around and see how things work. I would like to thank you for the awesome arbotix board and all the work you have put into the software.

Chuck Durham
"cdraptor"

Yeah the Dragoon quad was RX-64 based, they aren't much faster than the AX-12s but the sheer size of that bot and length of its legs was what got it moving so quickly. I was using an ArbotiX + RX Bridge and a slightly modified NUKE generated gait (I had it set so that the body would shift forward in proportion to how quickly it was going, otherwise the COG was too far back).

If you're looking to step things up, check out the RX-24F as well. Bang for buck its an amazing servo- we cannot even keep them in stock at the moment, flying off the shelves.

RobotAtlas
07-19-2010, 07:28 PM
Wouldn't it make more sense to upgrade from AX-12 to AX-18F instead of RX-24F?
The same size/brackets/bus but much faster?

sthmck
07-19-2010, 08:36 PM
The RX-24f is actually a decent amount faster than even the AX-18f. Plus you also get more torque. Yeah you are going to have to get new brackets and the bus is different, but after spending time getting the most you can from ax-12's its probably going to be a better long term move to go ahead and purchase the RX-24f's.

cdraptor
07-20-2010, 06:28 PM
Well I am probably going to get a few of the AX-18s since they fit with the AX-12 brackets. I can use the current brackets and such to at least design/prototype - I am sure I will eventually buy up some bigger meaner servos and switch over to the metal brackets.

Slugman
01-25-2011, 11:45 PM
..and with a lurch & a roar this thread returns to life!
I recently got my 2nd batch of AX12's, (Yay to Trossen & their fast delivery!) to bring my total to 22 - Enough for a hex with 4DoF in the 2 front legs + a turret, but am getting some strange results from Pypose.
Firstly, can someone point me to a fix to allow 'Terminal' to look for more than 18 servos? I have checked each one individually & made sure they are all correctly numbered, but I have to assume that the "mv 1 19" command works as "ls" only lists up to 18. Ditto for servos 20, 21 & 22. I understand that I could have up to 30 AX12s, but "ls" only gets up to 18.
When I go back to 'Poses' it seems to have all the correct servos listed, but I am still getting strange movements from some of the servos. I can read the current positions of all of them, & they all read correctly, but when I click on the "set" button it gets weird, even if I haven't moved them in the meantime. FYI, all servo positions are at 512, apart from one at 228 & another at 810.

Specifically, servos 21 & 22 (New ones) go nuts - Turning quickly away from their set position as though they were originally set out of the 300deg range (I know what that looks like now, & have triple-checked each servo!!!), a servo in a front leg (No.19 - another new one) moves quickly to its lower limit then stops, & two of my old servos (No.s 1 & 4 - each one on a different leg) quickly find their correct position, then slowly creep around to reach their lower limit as well - Moving about 10 degrees every second. I am powering it from a mains variable power-supply, giving 12v (Checked with a multi-meter), & able to pump out up to 15 Amps if required, so I don't think it's a lack of power. Besides, the servos have so little load on them in that pose that they can hold their position even when not powered.
Can anyone assist? OK, so I'm guessing that only Fergs would be able to help, but I might as well ask everyone... :confused: Running on windows 7, Arduino 18 & the Arbotix, servos & programs are all relatively new, so they should not be the problem. Was recently running DBs program on my 12DoF quad until I got the new servos, & it was all working fine, including those two servos that are now 'creeping'. Oh, & yes, I have uploaded PyPose back onto the Arbotix, & using my first PyPose save which only had one servo, I can control each individual servo correctly, it's just when I connect all 22 that I get an issue.

lnxfergy
01-26-2011, 12:13 AM
Firstly, can someone point me to a fix to allow 'Terminal' to look for more than 18 servos?

Open the tools/Terminal.py file, search for '18' and replace with '22' (there is only one occurrence) -- you should be good to go.


Oh, & yes, I have uploaded PyPose back onto the Arbotix, & using my first PyPose save which only had one servo, I can control each individual servo correctly, it's just when I connect all 22 that I get an issue.Check that in your <arduino>/libraries/Bioloid/ax12.h file, a line near the top:

#define AX12_MAX_SERVOS 18

has been changed to:

#define AX12_MAX_SERVOS 22

Otherwise, it's probably overrunning the buffer when loading poses (which use the interpolation engine). You probably have to update the MAX_SERVOS number, and then reload pypose sketch.

-Fergs

EDIT: For Future Reference, the standard limits in the 0013 release are:
Pypose pose editor -- max size of a project is 30 servos (that's the max sliders).
Pypose terminal -- only searches up to 18, to avoid taking a very long time.
Bioloid Controller -- interpolation engine defaults to 18, to avoid eating extra space for large buffers.

Slugman
01-26-2011, 04:09 AM
:happy: Fast and efficient as always. Thanks for that. I'll give it a go after dinner, but even just reading it, it makes sense to me. :happy:

Ruskie
05-18-2011, 01:14 PM
I'm curious, as I sit here waiting anxiously for my Arbotix starter kit to arrive, did the mammalian NUKE support ever get released? I haven't been able to find confirmation.

Thanks!

lnxfergy
05-18-2011, 01:55 PM
I'm curious, as I sit here waiting anxiously for my Arbotix starter kit to arrive, did the mammalian NUKE support ever get released? I haven't been able to find confirmation.

Thanks!

It's available through SVN checkout, but hasn't made it into a regular release (such as our numbered zip downloads).

-Fergs

Ruskie
05-18-2011, 02:11 PM
Thanks Fergs!

So... (Pardon my noobness...) how do I access that? I don't see anything on the code.google site, other than indicating that it is still under the long term plans. Do I volunteer to check it out?

Ruskie
06-09-2011, 08:46 PM
Success! After playing with it for a day or 2, I have gotten my robot to work using the Arbotix starter kit! Way easy (assuming that you don't skip over crucial parts like not being able to use the Pololu ISP for 2 way serial communication....)

I have tried to access the SVN Checkout for the Arbotix to try out the Mammalian support, but I don't seem to be having any luck. I tried navigating to: http://arbotix.googlecode.com/svn/trunk/ arbotix-read-only (I've tried it with and without a space before "arbotix-read-only") but that doesn't lead to a valid URL. When I try browsing in /svn/trunk/pypose/tools/models/mammals3 I'm told that there are no files in the selected directory.

I don't have familiarity with checking out code, I've never done it before, so I acknowledge that it's probably user error on my part. What am I doing wrong?

inferno965
06-24-2011, 02:31 PM
Hey guys

I've got a PhantomX RoboTurret and I've been having a lot of fun playing with it in PyPose. The thing is, my inner nerd is getting the best of me and I want to try and create a custom program specifically for the turret (I'm just working at it in Python). I need help figuring out a way to hardcode the poses straight into the program (in the end I want to link the poses to specific buttons and just click the button to make it do the pose). Maybe I've just been thinking about it too hard for too long but I've got nothing on this:confused:. Any help would be appreciated.

also, forgive my noobness if I'm asking a question that I just skimmed over in my attempts to find more information on this subject.

Slugman
06-25-2011, 02:25 AM
Ahhhh, a fellow noob! :happy:
I'm use a variation of DarkBacks program in the Bot, & my own apallingly bad python program on the computer side.
I use Windows 7, unlike most of the guys here who seem to use Linux. If you are using Linux, then I think most of the control programs found in the Data Centre will work for you. Good luck, & welcome to the frustrating yet rewarding dark side. :wink:

Stobs
06-26-2011, 09:58 PM
I've tried for several days now but, on launching PyPose.py, I get a momentary CLI and then it closes. I have been able to get this screen capture for reference:
http://img818.imageshack.us/img818/2015/pyposepycmdblipnoax12mo.th.png (http://imageshack.us/photo/my-images/818/pyposepycmdblipnoax12mo.png/)

I have a copy of PyPose.py in both my "C:\Python25\" and "...arbotix\pypose\" directories (for some reason a search on my Win7 system does not find the copy in my arbotix subdirectory), but the same situation occurs for either instance on launching.

From viewing the fleeting reference to the "AX12 module" of the screen capture I've included the entire contents of the PyPose.py file's contents, below. The screen capture references line 27, which I've highlighted in red.


#!/usr/bin/env python

"""
PyPose: Bioloid pose system for arbotiX robocontroller
Copyright (c) 2008-2010 Michael E. Ferguson. All right reserved.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
"""

import sys, time, os
sys.path.append("tools")
import wx
import serial

from ax12 import *
from driver import Driver

from PoseEditor import *
from SeqEditor import *
from project import *

VERSION = "PyPose 0013"

################################################## #############################
# Main editor window
class editor(wx.Frame):
""" Implements the main window. """
ID_NEW=wx.NewId()
ID_OPEN=wx.NewId()
ID_SAVE=wx.NewId()
ID_SAVE_AS=wx.NewId()
ID_EXIT=wx.NewId()
ID_EXPORT=wx.NewId()
ID_RELAX=wx.NewId()
ID_PORT=wx.NewId()
ID_ABOUT=wx.NewId()
ID_TEST=wx.NewId()
ID_TIMER=wx.NewId()
ID_COL_MENU=wx.NewId()
ID_2COL=wx.NewId()
ID_3COL=wx.NewId()
ID_4COL=wx.NewId()

def __init__(self):
""" Creates pose editor window. """
wx.Frame.__init__(self, None, -1, VERSION, style = wx.DEFAULT_FRAME_STYLE & ~ (wx.RESIZE_BORDER | wx.MAXIMIZE_BOX))

# data for our program
self.project = project() # holds data for our project
self.tools = dict() # our tool instances
self.toolIndex = dict() # existant tools
self.saveReq = False
self.panel = None
self.port = None
self.filename = ""
self.dirname = ""
self.columns = 2 # column count for pose editor

# for clearing red color on status bar
self.timer = wx.Timer(self, self.ID_TIMER)
self.timeout = 0

# build our menu bar
menubar = wx.MenuBar()
prjmenu = wx.Menu()
prjmenu.Append(self.ID_NEW, "new") # dialog with name, # of servos
prjmenu.Append(self.ID_OPEN, "open") # open file dialog
prjmenu.Append(self.ID_SAVE,"save") # if name unknown, ask, otherwise save
prjmenu.Append(self.ID_SAVE_AS,"save as") # ask for name, save
prjmenu.AppendSeparator()
prjmenu.Append(self.ID_EXIT,"exit")
menubar.Append(prjmenu, "project")

toolsmenu = wx.Menu()
# find our tools
toolFiles = list()
for file in os.listdir("tools"):
if file[-3:] == '.py' and file != "__init__.py" and file != "ToolPane.py":
toolFiles.append(file[0:-3])
# load tool names, give them IDs
for t in toolFiles:
module = __import__(t, globals(), locals(), ["NAME"])
name = getattr(module, "NAME")
id = wx.NewId()
self.toolIndex[id] = (t, name)
toolsmenu.Append(id,name)
toolsmenu.Append(self.ID_EXPORT,"export to AVR") # save as dialog
menubar.Append(toolsmenu,"tools")

configmenu = wx.Menu()
configmenu.Append(self.ID_PORT,"port") # dialog box: arbotix/thru, speed, port
columnmenu = wx.Menu()
columnmenu.Append(self.ID_2COL,"2 columns")
columnmenu.Append(self.ID_3COL,"3 columns")
columnmenu.Append(self.ID_4COL,"4 columns")
configmenu.AppendMenu(self.ID_COL_MENU,"pose editor",columnmenu)
#configmenu.Append(self.ID_TEST,"test") # for in-house testing of boards
# live update?
menubar.Append(configmenu, "config")

helpmenu = wx.Menu()
helpmenu.Append(self.ID_ABOUT,"about")
menubar.Append(helpmenu,"help")

self.SetMenuBar(menubar)

# configure events
wx.EVT_MENU(self, self.ID_NEW, self.newFile)
wx.EVT_MENU(self, self.ID_OPEN, self.openFile)
wx.EVT_MENU(self, self.ID_SAVE, self.saveFile)
wx.EVT_MENU(self, self.ID_SAVE_AS, self.saveFileAs)
wx.EVT_MENU(self, self.ID_EXIT, sys.exit)

for t in self.toolIndex.keys():
wx.EVT_MENU(self, t, self.loadTool)
wx.EVT_MENU(self, self.ID_EXPORT, self.export)

wx.EVT_MENU(self, self.ID_RELAX, self.doRelax)
wx.EVT_MENU(self, self.ID_PORT, self.doPort)
wx.EVT_MENU(self, self.ID_TEST, self.doTest)
wx.EVT_MENU(self, self.ID_ABOUT, self.doAbout)
self.Bind(wx.EVT_CLOSE, self.doClose)
self.Bind(wx.EVT_TIMER, self.OnTimer, id=self.ID_TIMER)

wx.EVT_MENU(self, self.ID_2COL, self.do2Col)
wx.EVT_MENU(self, self.ID_3COL, self.do3Col)
wx.EVT_MENU(self, self.ID_4COL, self.do4Col)

# editor area
self.sb = self.CreateStatusBar(2)
self.sb.SetStatusWidths([-1,150])
self.sb.SetStatusText('not connected',1)

self.loadTool()
self.sb.SetStatusText('please create or open a project...',0)
self.Centre()
# small hack for windows... 9-25-09 MEF
self.SetBackgroundColour(wx.NullColor) # wx.SystemSettings.GetColour(wx.SYS_COLOUR_MENU)
self.Show(True)

################################################## #########################
# toolpane handling
def loadTool(self, e=None):
if e == None:
t = "PoseEditor"
else:
t = self.toolIndex[e.GetId()][0] # get name of file for this tool
if self.tool == t:
return
if self.panel != None:
self.panel.save()
self.sizer.Remove(self.panel)
self.panel.Destroy()
self.ClearBackground()
module = __import__(t, globals(), locals(), [t,"STATUS"])
panelClass = getattr(module, t)
if t == "PoseEditor":
self.panel = panelClass(self,self.port,self.columns)
else:
self.panel = panelClass(self,self.port)
self.sizer=wx.BoxSizer(wx.VERTICAL)
self.sizer.Add(self.panel,1,wx.EXPAND|wx.ALL,10)
self.SetSizer(self.sizer)
self.SetAutoLayout(1)
self.sizer.Fit(self)
self.sb.SetStatusText(getattr(module,"STATUS"),0)
self.tool = t
self.panel.SetFocus()

################################################## #########################
# file handling
def newFile(self, e):
""" Open a dialog that asks for robot name and servo count. """
dlg = NewProjectDialog(self, -1, "Create New Project")
if dlg.ShowModal() == wx.ID_OK:
self.project.new(dlg.name.GetValue(), dlg.count.GetValue())
self.loadTool()
self.sb.SetStatusText('created new project ' + self.project.name + ', please create a pose...')
self.SetTitle(VERSION+": " + self.project.name)
self.panel.saveReq = True
self.filename = ""
dlg.Destroy()

def openFile(self, e):
""" Loads a robot file into the GUI. """
dlg = wx.FileDialog(self, "Choose a file", self.dirname, "", "*.ppr", wx.OPEN)
if dlg.ShowModal() == wx.ID_OK:
self.filename = dlg.GetPath()
self.dirname = dlg.GetDirectory()
print "Opening: " + self.filename
self.project.load(self.filename)
self.SetTitle(VERSION+": " + self.project.name)
dlg.Destroy()
self.loadTool()
self.sb.SetStatusText('opened ' + self.filename)

def saveFile(self, e=None):
""" Save a robot file from the GUI. """
if self.filename == "":
dlg = wx.FileDialog(self, "Choose a file", self.dirname,"","*.ppr",wx.SAVE)
if dlg.ShowModal() == wx.ID_OK:
self.filename = dlg.GetPath()
self.dirname = dlg.GetDirectory()
dlg.Destroy()
else:
return
self.project.saveFile(self.filename)
self.sb.SetStatusText('saved ' + self.filename)

def saveFileAs(self, e):
self.filename = ""
self.saveFile()

################################################## #########################
# Export functionality
def export(self, e):
""" Export a pose file for use with Sanguino Library. """
if self.project.name == "":
self.sb.SetBackgroundColour('RED')
self.sb.SetStatusText('please create a project')
self.timer.Start(20)
return
dlg = wx.FileDialog(self, "Choose a file", self.dirname,"","*.h",wx.SAVE)
if dlg.ShowModal() == wx.ID_OK:
self.project.export(dlg.GetPath())
self.sb.SetStatusText("exported " + dlg.GetPath(),0)
dlg.Destroy()

################################################## #########################
# Port Manipulation
def findPorts(self):
""" return a list of serial ports """
self.ports = list()
# windows first
for i in range(20):
try:
s = serial.Serial("COM"+str(i))
s.close()
self.ports.append("COM"+str(i))
except:
pass
if len(self.ports) > 0:
return self.ports
# mac specific next:
try:
for port in os.listdir("/dev/"):
if port.startswith("tty.usbserial"):
self.ports.append("/dev/"+port)
except:
pass
# linux/some-macs
for k in ["/dev/ttyUSB","/dev/ttyACM","/dev/ttyS"]:
for i in range(6):
try:
s = serial.Serial(k+str(i))
s.close()
self.ports.append(k+str(i))
except:
pass
return self.ports
def doPort(self, e=None):
""" open a serial port """
if self.port == None:
self.findPorts()
dlg = wx.SingleChoiceDialog(self,'Port (Ex. COM4 or /dev/ttyUSB0)','Select Communications Port',self.ports)
#dlg = PortDialog(self,'Select Communications Port',self.ports)
if dlg.ShowModal() == wx.ID_OK:
if self.port != None:
self.port.ser.close()
print "Opening port: " + self.ports[dlg.GetSelection()]
try:
# TODO: add ability to select type of driver
self.port = Driver(self.ports[dlg.GetSelection()], 38400, True) # w/ interpolation
self.panel.port = self.port
self.panel.portUpdated()
self.sb.SetStatusText(self.ports[dlg.GetSelection()] + "@38400",1)
except:
self.port = None
self.sb.SetBackgroundColour('RED')
self.sb.SetStatusText("Could Not Open Port",0)
self.sb.SetStatusText('not connected',1)
self.timer.Start(20)
dlg.Destroy()

def doTest(self, e=None):
if self.port != None:
self.port.execute(253, 25, list())

def doRelax(self, e=None):
""" Relax servos so you can pose them. """
if self.port != None:
print "PyPose: relaxing servos..."
for servo in range(self.project.count):
self.port.setReg(servo+1,P_TORQUE_ENABLE, [0,])
else:
self.sb.SetBackgroundColour('RED')
self.sb.SetStatusText("No Port Open",0)
self.timer.Start(20)

def doAbout(self, e=None):
license= """This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA)
"""
info = wx.AboutDialogInfo()
info.SetName(VERSION)
info.SetDescription("A lightweight pose and capture software for the arbotiX robocontroller")
info.SetCopyright("Copyright (c) 2008,2009 Michael E. Ferguson. All right reserved.")
info.SetLicense(license)
info.SetWebSite("http://www.vanadiumlabs.com")
wx.AboutBox(info)

def doClose(self, e=None):
# TODO: edit this to check if we NEED to save...
if self.project.save == True:
dlg = wx.MessageDialog(None, 'Save changes before closing?', '',
wx.YES_NO | wx.CANCEL | wx.ICON_QUESTION)
r = dlg.ShowModal()
if r == wx.ID_CANCEL:
e.Veto()
return
elif r == wx.ID_YES:
self.saveFile()
pass
self.Destroy()

def OnTimer(self, e=None):
self.timeout = self.timeout + 1
if self.timeout > 50:
self.sb.SetBackgroundColour(wx.NullColor)
self.sb.SetStatusText("",0)
self.sb.Refresh()
self.timeout = 0
self.timer.Stop()

################################################## #########################
# Pose Editor width settings
def do2Col(self, e=None):
self.columns = 2
if self.tool == "PoseEditor":
self.loadTool()
def do3Col(self, e=None):
self.columns = 3
if self.tool == "PoseEditor":
self.loadTool()
def do4Col(self, e=None):
self.columns = 4
if self.tool == "PoseEditor":
self.loadTool()

################################################## #############################
# New Project Dialog
class NewProjectDialog(wx.Dialog):
def __init__(self, parent, id, title):
wx.Dialog.__init__(self, parent, id, title, size=(270, 180))

panel = wx.Panel(self, -1)
vbox = wx.BoxSizer(wx.VERTICAL)

wx.StaticBox(panel, -1, 'Project Parameters', (5, 5), (260, 80))
wx.StaticText(panel, -1, 'Name:', (15,30))
self.name = wx.TextCtrl(panel, -1, '', (105,25))
wx.StaticText(panel, -1, '# of Servos:', (15,55))
self.count = wx.SpinCtrl(panel, -1, '18', (105, 50), min=1, max=30)

hbox = wx.BoxSizer(wx.HORIZONTAL)
okButton = wx.Button(self, wx.ID_OK, 'Ok', size=(70, 30))
closeButton = wx.Button(self, wx.ID_CANCEL, 'Close', size=(70, 30))
hbox.Add(okButton, 1)
hbox.Add(closeButton, 1, wx.LEFT, 5)

vbox.Add(panel)
vbox.Add(hbox, 1, wx.ALIGN_CENTER | wx.TOP | wx.BOTTOM, 10)

self.SetSizer(vbox)


if __name__ == "__main__":
print "PyPose starting... "
app = wx.PySimpleApp()
frame = editor()
app.MainLoop()

I currently have only the USB XBee Explorer connected to my system and I did verify compilation, board and COM port before uploading the PyPose sketch via the Arduino IDE to the arbotiX - and subsequently relaunched PyPose.Py, to no avail.

It seems to me that I've missed a file to be included in the Python path, but since I don't know what the file is - or even if that's actually the case, I thought I'd post a help request here.

Needless to say but, assistance in resolving this would be greatly appreciated.

Regards

lnxfergy
06-26-2011, 11:16 PM
Well if PyPose.py wasn't found until you moved it into C:\Python25\, how about putting the rest of the code into C:\Python25\, for instance, ax12.py.

-Fergs

Stobs
06-27-2011, 12:42 AM
I was surprised when that didn't work Fergs - I'm now getting wx-related errors. At this point I'm going to do some file management to try and clear up any issues that might be arising from my initial installations, and then re-install from scratch. Thanks for your help, much appreciated - even though you're right, I should've seen that one myself.

Regards

Kar
06-28-2011, 07:22 AM
Hi guys. I am having a few problems with my pypose set up.
My problem is pypose is not letting me set a port.
1. I open pypose
2. I Make new Project
3. I set the port.

Now this is what its doing. I open the select communications tab to serlect a port. There I only have 1 port
( COM 1 ). Now i have tryed to use this port but with out any luck. After i serlect COM1 it's then shows in the lower right corner of pypose as ( [email protected] ). But it still dose not alow me to conect to my PhantomX.

One of the things i am wondering if i am doing rong is. I am using the FTDI cabel with the FTDI brake out.
Should i be trying to use the Xbees with what i think is the xbee Explorer usb.
But in any case I am still not aball to set the port i need to use.

Kar
06-28-2011, 08:49 AM
OK big thanks to Kamonedelious.

Kam pointed out to me that it was a pypose problem and not something i was doing rong. My computer was showing com39 as my FTDI but pypose was not picking it up.

So i am going to quote Kam.

Pypose only looks for ports of up to 20 and not any higher aka 39. go to line 247 of your pypose.py and change it from 20 to 40.

Problem fixed.

Kar
07-01-2011, 12:50 PM
Hi again.
Ok so i got my next hick up.
I am getting Fail read on all my servos.
My xbees are paired and working i know this because when i have the nuke page open and i go to test drive it works fine.
I am getting the problem when i try to capture limits or neutral.
so just to be extra clear. When in test drive the green light flashes when im trying to captur neutral it just stays on no flashing at all and when i go the pose editr its not even on showing any link with the xbees.
i get Fail Read 18 times for the nomber of servos.

Ok thanks for you time

Garry

Stobs
07-01-2011, 05:31 PM
Hi Kar,

We may be having similar issues with regards to the read failures. If I understand the process correctly you should be able to upload the PyPose sketch to your arbotiX and then access it through the PyPose terminal - which would be communicating between your computer and the arbotiX through the XBees. Are you able to do that?

Regards

Stobs
07-01-2011, 10:01 PM
(32bit Windows7)
I'm still not able to launch PyPose terminal successfully, so I uninstalled or deleted all files to do with arbotiX, Arduino, PyPose, and Python, with the exception of the zip files. I've started a step-by-step install, but am now having an issue with the ax12.h implementation.

On attempting to compile the pypose sketch I saw that neither the ax12 nor the BioloidController header files were being recognized within the Arduino IDE. On locating these files:


ax12.cpp
ax12.h
BioloidController.cpp
BioloidController.h
keywords.txt

...in the "C:\arbotiX\libraries\Bioloid" subdirectory, I copied this "Bioloid" folder into the "C:\arduino-0022\libraries" subdirectory. On relaunching the Arduino IDE the BioloidController include was now active [but] the ax12 include remained unrecognized even after a system reboot.

I looked through many of the "keyword.txt" files in the "C:\arduino-0022\libraries" and decided to create a separate folder named "ax12" and placed it into this same directory after copying both the "ax12.cpp" and "ax12.h" files to it - even though I don't recall doing so in getting pypose.pde to compile before I did the uninstalls and deletions.

At this point I'm wondering if I've erred in my system's configuration, or if I now have a corruption.

Pointers would be appreciated.

Regards

lnxfergy
07-02-2011, 07:58 AM
Hi again.
Ok so i got my next hick up.
I am getting Fail read on all my servos.
My xbees are paired and working i know this because when i have the nuke page open and i go to test drive it works fine.
I am getting the problem when i try to capture limits or neutral.
so just to be extra clear. When in test drive the green light flashes when im trying to captur neutral it just stays on no flashing at all and when i go the pose editr its not even on showing any link with the xbees.
i get Fail Read 18 times for the nomber of servos.

Ok thanks for you time

Garry

As Stobs said, you need to upload the "pypose" sketch whenever you are using PyPose with the ArbotiX. The exported hexapod control sketch doesn't know anything about the PyPose protocol and won't respond to the capture requests.

-Fergs

Kar
07-02-2011, 03:29 PM
ok what stobs and fergs dose make sence but im still on the set up stage. So im trying to capcher my servo limits. So once i have input my servo id's i now need to sart to capture my min and max for the servos. How can i do this if i can to read my servos????. From what i understand from waching the youtube vid and reading the setup page. I need to do this first. At this stage of the set up i dont have a skech to load right??

Kar
07-02-2011, 06:16 PM
ok problem fixed i was not loading pypose pde on to the arbotix did not know that. noobed out.
Thanks for your help darkback2

darkback2
07-04-2011, 06:32 AM
We all noob out every once in a while...I still get all panicky and wonder what is wrong with my robot every time the battery dies and it starts behaving "interestingly".

Kar
07-04-2011, 04:39 PM
well here we are again.
Spent the last 2 days playing around trying to get nuke to work.
Step 1 make now project.
step 2 add in my bot leg figgers and chassie figgers.
step 3 capture limits and neutral. So far so good.

Ok now on with the next step and this is where it gose bad.
Step 4 set/test signs. this is when it gose bad. I click test signs just as fergs dose in his youtube tutorial it starts, then my servos smash them selfs in to a strange posison and all the servos flash red.
http://forums.trossenrobotics.com/album.php?albumid=102&pictureid=673

I have repeted these steps about 6 times each time ending the same.
Im at a los to what is going rong. All i can think of is peraps i am missing a file or i have a file in the rong place.

Has any one els had this problem and if so how did you solve it.

Thanks for your time
Garry

Slugman
07-04-2011, 06:51 PM
I had similar issues when I was at where you are - For me, it was caused by a combination of problems.
1 - I was moving the servos incorrectly when finding the minimum & maximum locations in Pypose - I was doing it the wrong way around. Actually I still don't know if this affects anything...
2 - The other problem was that my min & max limits were out of range - Outside the 300 degree range of the servo, so the servo would try to take a short cut back through zero degrees to get where it wanted to go. This was caused by me not checking where the middle line was on the servos when I was bolting everything together.

Best of luck. :happy:

lnxfergy
07-05-2011, 11:41 AM
99% of the time, errors here are caused by the limits being wrong. The limit calculation works like this: we capture two endpoints, the lower value is put down as the lower limit, the other is the high limit. So, if you happen to capture a low value like 200, and then push the servo around, off the other endpoint, it might read 0 in the deadband -- suddenly, instead of having 200-1023, you have 0-200 as the limits. Or, if you moved the wrong servo, you may have low & high of the same value, either way, the neutral position is regarded as "out of bounds".

You can verify if this is the cause pretty easily -- switch to the pose editor and see that each of your "neutral" positions actually falls within the low-high range of the limits -- it probably doesn't and so right off the bat, the servo is out of range, no value is loaded into the buffer, and the buffer contains all 0s -- so it shoots to position 0 and typically that is outside your real limits.

-Fergs

Ungolianth
01-16-2017, 09:03 AM
Hi guys,

I´ve a problem when trying to set up the robot (PhantomX MarkIII)
The first two steps of capturing limits and capturing the neutral position work fine, but when I try to set and test signs I get the default message: "fill in IK variables"
Any ideas what could have gone wrong?
Thanks

darkback2
12-21-2017, 02:19 PM
Is there a limit on how many servos an arbotix-m can control? I am running a robot with 24 servos. If I run pypose to control 22 then everything works just fine. 23 or more and I get error 64. Any ideas?

Things I have tried:
Controlling the 24 servos using robotis dynamixel wizard = Worked
Controlling each leg independently using robotis dynaixel wizard = worked
Controlling 6, then 12, then 18, then 20, then 21, then 22 servos using pypose = worked
Controlling 23 or more servos using pypose = failed.

What I will try next,

Renumber servos 19 = 24 to 1 - 6 and running the single leg test to see if that works.

Then renumber them from 19 - 24 and wait for any possible help...

Thanks in advanced.

DB

darkback2
12-21-2017, 02:46 PM
Renumbering the servos 19 - 24 to 1 - 6 and running the single leg test (controlling 6 servos using pypose on an arbotix-m worked. (this shows that the servos or wiring are not the problem?

I also conducted the above test using both a wall power supply and a battery.

The battery 3s lipo at 10c and the power supply 12 volts @3 amps may be the problem? I have a 40C 3s battery for my quad, but it is only 1400 mA

I would have to wait until at least tomorrow to get the bench top power supply from work if that might be the problem.

Any ideas as to what I might try next or what the problem may be?

DB

DB

darkback2
12-21-2017, 03:12 PM
Tried editing AX12.H. Increased Max servos to 40 and increased MAX buffer size to 64. Hoped that would help, but no luck.

Going to try setting max servos to 25 next...No idea if that would accomplish anything.

DB

darkback2
12-21-2017, 04:12 PM
Had an Idea and ran with it. Tried running a sequence instead of the pose editor. As a sequence I can control all 24 motors. Just can't do it in the pose editor directly. I also found that if I turn on live editor I can manipulate all 24 servos, I just can't set it to a pose without doing it through the sequence editor first...

Any ideas?