Software modifications and upgrades of Hexy

Post all your hardware and software upgrades/projects here.

Re: Software modifications and upgrades of Hexy

Postby michal » Sat Jun 22, 2013 4:36 pm

TooManySecrets wrote:What python version are you using, could you pls maybe post direct links to the stuff we need. There is a lot of downloads on all of those pages.


This is exactly what I was afraid of. It's difficult to help you if you don't know how to download and install a library for python.
I'm using Python 2.7.3 by the way. I will not give you direct link, because this depends on the OS you are using. I have Win XP, 32bit.
michal
 
Posts: 36
Joined: Thu Jun 06, 2013 7:01 pm
Location: Delft, NL

Re: Software modifications and upgrades of Hexy

Postby TooManySecrets » Sat Jun 22, 2013 6:47 pm

Have all the stuff instaled now. Python 2.7 and the needed libraries. Try to open the pomoco.py and a window opens and closes. Cant even see what it says since its very fast.
Image
TooManySecrets
 
Posts: 79
Joined: Mon Jan 14, 2013 5:02 pm

Re: Software modifications and upgrades of Hexy

Postby michal » Sat Jun 22, 2013 7:36 pm

For debugging it is better to open PoCoMo in IDLE (right click on *.py and choose "Edit with IDLE") there you can run the code and see all error messages.
michal
 
Posts: 36
Joined: Thu Jun 06, 2013 7:01 pm
Location: Delft, NL

Re: Software modifications and upgrades of Hexy

Postby rpcook » Sat Jun 22, 2013 8:30 pm

Michal, just started looking at your code. One of my concerns is from your second post on this thread that your binary communication protocol might preclude using any "old PoMoCo" code and the ASCII based serial interface. Is this the case?

I've had a look at your Servotor32.cpp, which seems to suggest that it'll understand either communication protocol. Could you please confirm before I have to remember how to reflash Hexy's brain?

You got a website or a blog somewhere with a Donate button? Feels like this level of Hexy awesomeness deserves a coffee/ beer bought for you.
Rob
A record of my exploits and musings with Hexy and Sparki: http://robcook.eu, content available under a Creative Commons license.
rpcook
 
Posts: 121
Joined: Tue Sep 04, 2012 6:42 pm
Location: Luton, UK

Re: Software modifications and upgrades of Hexy

Postby michal » Sat Jun 22, 2013 8:51 pm

rpcook wrote:Michal, just started looking at your code. One of my concerns is from your second post on this thread that your binary communication protocol might preclude using any "old PoMoCo" code and the ASCII based serial interface. Is this the case?

I've had a look at your Servotor32.cpp, which seems to suggest that it'll understand either communication protocol. Could you please confirm before I have to remember how to reflash Hexy's brain?

You got a website or a blog somewhere with a Donate button? Feels like this level of Hexy awesomeness deserves a coffee/ beer bought for you.


You are right, my version of Servotor32 also supports the old way of communication. I use the binary communication only for IK control, but this can be disabled if necessary. The only thing I messed up is the ping() function is Servotor32, because I'm playing with it now and I forgot to reverse these changes before upload.
Ad donation - I don't do this for money, but it feels good to be appreciated :)
michal
 
Posts: 36
Joined: Thu Jun 06, 2013 7:01 pm
Location: Delft, NL

Re: Software modifications and upgrades of Hexy

Postby roboalchemist » Sun Jun 23, 2013 3:21 am

Yeah, I'm going to have to find a good way to package all of this up in such a way that people aren't going to have to install a bajillion plugins. PySerial seems to cause enough support headaches, I can't imagine them having to install all the above as well.
---
Joseph Schlesinger - ArcBotics Co-Founder/CTO
roboalchemist
Site Admin
 
Posts: 673
Joined: Mon Jul 16, 2012 3:02 am

Re: Software modifications and upgrades of Hexy

Postby rpcook » Sun Jun 23, 2013 9:00 am

In terms of a package for general use, might I suggest rolling in the binary communication protocol (those 30fps videos blow my mind), and then use some implementation of some IK demos (like the body rotation/ translation), but perhaps implemented in native Python code so that users don't have to install NumPy. Not requiring extra libraries for the IK code will also make it easier to port to other platforms (Android?).

I've not had a chance to investigate in much detail yet, but I think that if you skip out the fancy graphics and joystick controls you could lose the other two plugins (matplotlib and pygame). Hopefully you should be able to implement something with the stock Python controllers (sliders etc) that will give you something of this level of control (of Hexy only, no mirroring on the screen)...
Rob
A record of my exploits and musings with Hexy and Sparki: http://robcook.eu, content available under a Creative Commons license.
rpcook
 
Posts: 121
Joined: Tue Sep 04, 2012 6:42 pm
Location: Luton, UK

Re: Software modifications and upgrades of Hexy

Postby michal » Sun Jun 23, 2013 11:51 am

A lot of numpy commands can be done by math, but I've no experience with math and arrays/matrices.
matplotlib is only for the virtual robot, but I find this very useful tool, especially for beginners because you can see what you do to the robot with your experiments without actually damaging it.
pygame is indeed optional and can be easily removed from the code
michal
 
Posts: 36
Joined: Thu Jun 06, 2013 7:01 pm
Location: Delft, NL

Re: Software modifications and upgrades of Hexy

Postby rpcook » Sun Jun 23, 2013 1:13 pm

Thanks for the tips Michal. My IK code uses the math library only, but doesn't quite finish the job to include body rotations like Michal's. I'm happy to go about and port what's implemented in NumPy into math if that'd help the community.

Joe, what would be the most useful from your point of view? It'd be really nice if we can work on something that will benefit lots of Hexy users.
Rob
A record of my exploits and musings with Hexy and Sparki: http://robcook.eu, content available under a Creative Commons license.
rpcook
 
Posts: 121
Joined: Tue Sep 04, 2012 6:42 pm
Location: Luton, UK

Re: Software modifications and upgrades of Hexy

Postby rpcook » Sun Jun 23, 2013 7:37 pm

Michal,

I've had a bit of a chance to play with this code now. Firmware on Hexy's microcontroller compiled fine and still works a treat, well done.

Your updated PoMoCo seemed to run fine after I'd tweaked your servotorComm.py to include the updates (around line 95) that allow it to automatically connect to the Bluetooth comm port under linux (Ubuntu). I noticed that your code had commented out that whole section... Any particular reason?

The GUI worked fine and seemed very slick. It might be my low screen resolution (only 600 lines) or possibly the Ubuntu OS, but the virtual Hexy didn't seem to render properly. I got the grid, but not all the bits of limbs are in the right location, looks like a failing at the Z-axis scaling to me.

One bug bear though: when I quit the GUI I get the following error at the console from which I launched Python.
Code: Select all
invalid command name "188452132callit"
    while executing
"188452132callit"
    ("after" script)

Problem with this is that it hangs up the Python instance and I have to manually kill the process. The "stock" PoMoCo doesn't show this behaviour. Any clues?
Rob
A record of my exploits and musings with Hexy and Sparki: http://robcook.eu, content available under a Creative Commons license.
rpcook
 
Posts: 121
Joined: Tue Sep 04, 2012 6:42 pm
Location: Luton, UK

PreviousNext

Return to Projects and Upgrades

Who is online

Users browsing this forum: No registered users and 2 guests

cron