PDA

View Full Version : Pypose question



wthierry
08-13-2014, 09:51 AM
So I fired up Pypose, and uploaded the sketch.... nothing happened. I noticed the code had Serial.begin() with a value that was inconsistent from the ROS sketch..and I couldnt read the servos, I changed it to be the same as in the Ros sketch (115200) and it can then read the seros, but I am wondering if I have the latest version of arbotix pypose code. Does anyone else know where the latest and greatest pypose code can be found?

tician
08-13-2014, 10:07 AM
Let's start from scratch. Make a new folder 'vanadium', and unzip the contents of the arbotix repo (https://github.com/vanadiumlabs/arbotix/archive/master.zip) and the pypose repo (https://github.com/vanadiumlabs/pypose/archive/master.zip) into folders named 'arbotix' and 'pypose', respectively. You should end up with 'vanadium/arbotix/pypose/pypose.ino' which you upload to the arbotix*, and 'vanadium/pypose/PyPose.py' which you will then use with the arbotix+pypose sketch through the commands 'cd what/ever/path/to/vanadium/pypose' then 'python.exe PyPose.py'. Copy-paste any and all error output verbatim using the code tags in your next response.
*after archiving/removing all old arbotix libraries in the Arduino sketchbook, then copying the newly downloaded versions of the arbotix projects and 'libraries' folders to the sketchbook. PyPose instructions imported to github from the old code.google site (http://vanadiumlabs.github.io/pypose/).

wthierry
08-13-2014, 12:24 PM
I believe I have the correct code as you stated, however the Serial.begin() function is still wrong in the pypose sketch, is it supposed to work with the Arbotix m?

tician
08-13-2014, 12:55 PM
Yeah... it apparently got changed in PyPose.py in a pull request here (https://github.com/vanadiumlabs/pypose/commit/9c1a26e1a22a37022d29c2175c9d8850512836cf), but not updated in pypose.ino or in driver.py prior to cleaning the trailing spaces here (https://github.com/vanadiumlabs/pypose/commit/4739f560bc18882bd9b2f250780628d80511d293) (driver.py still lists 38400 as default if no other rate is passed during __init__). Change either to match the other and it should start working again.

wthierry
08-13-2014, 03:23 PM
done, and it started working. Also, the first time I ran pypose I failed to set the postioning from 1024 to 4096, which is another reason my first attempt snapped all my plastic parts.

tician
08-13-2014, 03:32 PM
Also beware that pypose defaults to a goal position of 512 no matter the resolution selected, so always capture and verify all servo values before writing or you may end up breaking more stuff.

wthierry
08-13-2014, 03:57 PM
Yea, I learned that one the hard way. I posted a video of the leg over on my thread regarding the Darwin op clone.

http://forums.trossenrobotics.com/showthread.php?7002-Mx-28-humanoid-Darwin-clone/page3

lnxfergy
08-30-2014, 08:04 PM
I just pushed a fix to revert the unintentional default baud change: https://github.com/vanadiumlabs/pypose/commit/aea2f90fe7453f8b76a115a9da65e070baea33a4

In the future, even just commenting on the line in the PR will help bring this to my attention (I don't visit these forums all that often these days).

-Fergs

wthierry
08-31-2014, 12:21 PM
I just pushed a fix to revert the unintentional default baud change: https://github.com/vanadiumlabs/pypose/commit/aea2f90fe7453f8b76a115a9da65e070baea33a4

In the future, even just commenting on the line in the PR will help bring this to my attention (I don't visit these forums all that often these days).

-Fergs

Awesome. Not a big deal though, makes people search and learn a bit about code before diving in... Thanks for the update though! Just curious, why was the Baud rate off, were you working with some non-standard motors???

lnxfergy
09-01-2014, 09:25 PM
Awesome. Not a big deal though, makes people search and learn a bit about code before diving in... Thanks for the update though! Just curious, why was the Baud rate off, were you working with some non-standard motors???

The baud rate has nothing to do with the motors really. The 38400 baud rate works pretty well with XBEE radios -- which is why it is the default. The problem with higher baud rates (115200, etc) is that the XBEE bandwidth is pretty limited, and if you have some 2.4ghz noise, you may not be able to send a full a constant stream at 115200bps. With the ROS drivers, we default to 115200 because we need the extra bandwidth (there is a lot more data being sent back and forth) and usually the link is a hard link (not a wireless one).

In this case, someone was using 115200 and accidentally left it in when they opened a pull request with other updates, and I missed that the baud rate got changed in addition to the other intended fixes.

-Fergs

Griffin2003
04-20-2015, 09:40 AM
There is an error in gaits.h that I just fixed this morning. This makes Tripod work, although the other gaits are much nicer.

I don't know how to submit changes to the NUKE code.

Here is the fix:

}else if(GaitType == TRIPOD){
gaitGen = &DefaultGaitGen;
gaitSetup = &DefaultGaitSetup;
gaitLegNo[RIGHT_FRONT] = 0;
gaitLegNo[LEFT_MIDDLE] = 0;
gaitLegNo[RIGHT_REAR] = 0;
gaitLegNo[LEFT_REAR] = 2;
gaitLegNo[RIGHT_MIDDLE] = 2; //changed from LEFT_FRONT
gaitLegNo[LEFT_FRONT] = 2; //changed from RIGHT_REAR
pushSteps = 2;
stepsInCycle = 4;