PDA

View Full Version : [Question(s)] Hexapod PhatonmX MarkIII PyPose



Ungolianth
01-12-2017, 10:51 AM
Hi guys,

I´ve got a PhantomX MarkIII hexapod and tried to reset it by uploading ros.ino and pypose.ino, because I wanted to redo the Pypose. I´ve downloaded all the programms for pypose and tried to follow the instructions given under: https://www.youtube.com/watch?v=biA7AhWRvpU
But Pypose doesn´t seem to work anymore, cause it can´t read the servos.
(It worked yesterday, but I hd to stop before I was finished, today it´s not working anymore and I don´t have a clue why)
It seems like Pypose is able to find all my servos, but not able to read them.
I get the following feedback:

PyPose starting...
NUKE: No project name
Opening port: COM5
NUKE: No nuke string
Opening port: COM5
Relax servos for capture...
PyPose: relaxing servos...
Oxff found
Oxff found
ID found: 1 //I get the same for all 18 servos, but would be a little bit to long to copy it all ;)
Length found: 2
Error level found: 0
Checksum found: 252
Checksum computed: 255

//... after the 18th servo this follows:
Oxff found
Oxff found
ID found: 1
Length found: 4
Error level found: 0
Parameter found: 156
Parameter found: 0
Checksum found: 94
Checksum computed: 255
Fail Read
Read Failed: Servo ID = 1
Fail Read
Read Failed: Servo ID = 1

I tried some other IDs after the first one, but always got the feedback of Read Failed.

Does anyone have any clue, why my servos are not readable?

Thanks a lot :)

jwatte
01-12-2017, 02:46 PM
ID found: 1
Length found: 4
Error level found: 0
Parameter found: 156
Parameter found: 0
Checksum found: 94
Checksum computed: 255
Fail Read


It looks like your serial port is somehow being interfered with, perhaps?
Is there more than one servo with the same ID?
Note that some servos may revert to ID 1 if they have a brown-out / low-power event.
It's better to start numbering servos from 2.

KurtEck
01-12-2017, 04:38 PM
I would also guess that at least one of the other servos reset it's id To Servo #1.

Note: I have not used PyPose in several years so I might not be much help here.

What I often do is use my own AX Servo test program to see what servos are found... And if necessary reset IDS.

One way to find out if some of your servos reset their IDS (or were never set to begin with) is if you have your test program try moving servo #1 to lets say 400, do multiple servos move?

With y PhantomX, I renumbered the standard Servo #1 to #19. I also have optional code, that at start up, the code checks to see if it can talk to all of the standard servos (2-19). If it finds that one is missing and if servo #1 exists, then it assumes the missing servo reset itself to #1 and my code resets that servo to what it thinks it should be...

Ungolianth
01-13-2017, 03:37 AM
It looks like your serial port is somehow being interfered with, perhaps?

What made you think so?

I haven´t checked all of the servo IDs yet, but the script tells me, that it found all 18 of them, thus it should be numbered right, why I haven´t checked it. But it´s definitely not Servo 1, becaue I´ve done the AXSimple Test several times with the ID1 and it worked and only one sevo replied.
Going to double check it today, though ;)

Ungolianth
01-13-2017, 04:01 AM
Turns out that one of the servos was actually set back to ID 1...
Thanks guys!
Gonna change that now and renumber my servos.



What I often do is use my own AX Servo test program to see what servos are found... And if necessary reset IDS.

With y PhantomX, I renumbered the standard Servo #1 to #19. I also have optional code, that at start up, the code checks to see if it can talk to all of the standard servos (2-19). If it finds that one is missing and if servo #1 exists, then it assumes the missing servo reset itself to #1 and my code resets that servo to what it thinks it should be...

Do you think you could send me those codes? I would really appreciate that. And it sounds pretty handy :)

KurtEck
01-13-2017, 10:48 AM
I am assuming Arduino setup... I am assuming Arduino 1.6.x or 1.8.x and hopefully you have the updated bioloid libraries...

My test program I mentioned, is a Hodge podge of semi-random stuff, that I tried and the like and is up at: https://github.com/KurtE/AX12_Test

I don't remember if it was setup to use the standard Bioloid library or my version BioloidSerial, which you can download from GitHub as well. If you are using the later versions of the Arduino setup they should be pretty much the same.

My Phoenix hexapod code base specific to the PhantomX is up at: https://github.com/KurtE/Phantom_Phoenix

The code for checking if 1 servo is missing is in the file: https://github.com/KurtE/Phantom_Phoenix/blob/master/_Phoenix_Driver_AX12.h
starting at about line 158

Ungolianth
01-14-2017, 07:41 AM
I am assuming Arduino setup... I am assuming Arduino 1.6.x or 1.8.x and hopefully you have the updated bioloid libraries...

Yes I have :)

Thanks a lot for the codes!


But PyPose is still not working properly. After capturing the limits and the neutral position the next step would be to "Set/test signs", but when I try to do so, I get the default message: "fill in IK variables"
I thought, that´s what I just did during the first two steps...
Any ideas anyone?

I don´t thik there´s any way to continue setting up the robot and get it to walk aganin wihtout Pypose, is there?

KurtEck
01-14-2017, 08:48 AM
Sorry, it has been a long time since I tried the Pypose code. When I first got my MK1, there was a preset up version of the program for the MK1 for the AX12 servos, which I tried out and verified my PhantomX worked. I then built a version of the Phoenix code base to work with the PhantomX, which I used after that. I have the Phoenix code base setup a couple of ways on GitHub. There is the pieces of it up in the Phoenix code base with example configurations up in the Arduino Phoenix Parts (https://github.com/KurtE/Arduino_Phoenix_Parts), which was setup to handle a few different setups. Mostly I did this with PhantomX and old Lynxmotion hexapods and a little with Orion Robotics (no longer exists)...

Or I extracted all of the pieces needed for the PhantomX into one easier to use setup with the Phantom_Phoenix project I mentioned in the previous post.

There is also instructions and the like talking about the Phoenix code setup on the Trossen website, and a probably fork of my stuff:
http://learn.trossenrobotics.com/10-interbotix/crawlers/phantomx-hexapod/68-phoenix-code.html

KurtEck
01-16-2017, 04:58 PM
As I mentioned, I have not used Pypose for a long time. Earlier when Trossen released some of the earlier versions, they had preconfigured setup for the AX12 or AX18 servo hexapods...

I have an old version which fails to compile on the current Arduino releases. I have a hacked up version that compiles, but I have not tried it. I included it here in case you wish to try it out and/or compare it to the version you are trying.

6835

Ungolianth
01-17-2017, 11:14 AM
Soooo, I tried PyPose for something what felt like 100 times and it´s finally working, at least it started to move when I want to set and test signs, but obviously my battery died midway through -.-
Guess I´m going to test it again tomorrow, cause I don´t have that much time left now.
But yeaaaaaah, finally something is happening.
Seems like the reason was, that I didn´t write anything in "Mid-Y (mm)", cause I didn´t know what that´s supposed to be or that the configuration for "6" as number of legs seems to vanish after each step and I typed it back in. At least that´s what I changed prior to the one time it actually seemde to work :P

Thanks a lot for helping me out with the files, though!
I tried uploading AX_12_PhantomX_Hexapod-170116a.zip (http://forums.trossenrobotics.com/attachment.php?attachmentid=6835&d=1484607417), but start configuration was pretty weird, with the main body lying down and legs in the air...

Moreover I tried:

My test program I mentioned, is a Hodge podge of semi-random stuff, that I tried and the like and is up at: https://github.com/KurtE/AX12_Test

but there were several files missing (ax12serial.h ; BioloidSerial.h) I´m pretty sure, I could have found them somewhere on your github page, but I was just short on time, cause I was trying different solutions at once.

No matter what, if PyPose is going to work properly tomorrow, I´m going to give a feedback and otherwise I´m going to dive deeper into your suggested solutions :)

Thanks a lot!

KurtEck
01-17-2017, 11:45 AM
Good luck! I am not sure how much support there is for pypose these days. When I look at the main GitHub page: https://github.com/vanadiumlabs/pypose I don't think anything has been changed for about 3 years now...

As for missing header files, I thought I mentioned that earlier, but they are in:
https://github.com/KurtE/BioloidSerial

Ungolianth
01-18-2017, 08:06 AM
Seems like all that had to be done, was to reset the number of legs to 6. Somehow it vanishes during the first to steps, but after being set again, it works nicely :)




As for missing header files, I thought I mentioned that earlier, but they are in:
https://github.com/KurtE/BioloidSerial

I´m pretty sure, you did, too. Sorry, for mentioning it.
Thanks again!