PDA

View Full Version : Pheonix code



deathwiz
09-24-2015, 03:53 PM
I have a mech bot that is currently running pheonix code. I had NUKE before but it didnt work quite right. I assume that pheonix code is allowed in competition? If thats the case, has anyone made changes to this code to allow control of a turret?

KurtEck
09-24-2015, 04:07 PM
I don't know anything about competition, but I don't imagine there are any restrictions on code base...

There is some Turret support built into the Phoenix code base.
Look in the code for places that use/define cTurretRotPin.

I don't remember what if any code is in the Commander code for the Phoenix for controlling it and how well it works, but I think there is some support, like the ability to toggle modes with R2 button and in one of the modes the joysticks probably control the turrets.

Kurt

deathwiz
09-24-2015, 06:46 PM
Thanks Kurt. I haven't gotten to dive into the whole pheonix code yet but I will here shortly. One thing i noticed when playing with the code on my robot, if i walk as fast as i can forward, the bot would drop down into the crawl position and get stuck there. It would then try to keep walking in a slow loop even when nothing was being pressed. Any idea why that would be?

Zenta
09-24-2015, 11:41 PM
I've observed that bug too. What Phoenix code version are you using?

KurtEck
09-25-2015, 09:51 AM
Hi Deathwiz, Not sure, it has been a long while since I have run Phoenix code with I assume an Arbotix with a Commander as input? So I am a bit rusty when it comes to this. Hex or Quad? As Zenta asked which code base? Also what version of Arduino? ... I believe the last version of Arduino that Trossen supported was 1.05 (maybe 06). Currently I only keep the latest versions (1.6.5) and as such have had my own Arbotix implementations, which I have not tested out for awhile.

Crawl position ? - Like when you hit (was going to say Triangle button but wrong controller) - It has been a bit of time, but can you raise or lower with holding one of the buttons down (L6? or LT? been awhile) and then using joystick to raise or lower?

What software are you using in the Commander? I usually updated them to my own version which gives me a longer range of values in the joysticks... But I think they should still have the same center locations...

Thanks Kåre, - (Have you seen it on Arbotix and/or Teensy?)

deathwiz
09-25-2015, 11:04 AM
Arduino version: 1.0.5
pheonix code used: PhantomX_V2_Commander_AX12_Stock (29-10-2009) version V2.0

Im also using the virtual commander controller on my laptop to control the bot. One of the buttons (I think R2) will put in into a crawl mode that is similar. It just lowers the body all the way down. Just tapping that button will bring it up or down. But when i am in regular mode and walking forward as fast as possible, its like it triggers it to go into crawl mode but then it gets stuck.

The bot is a hex using an arbotix.

KurtEck
09-25-2015, 01:09 PM
Again I am not currently setup to run this, but you might try the code in:
https://github.com/KurtE/Phantom_Phoenix

To see if this works any different.

deathwiz
09-25-2015, 05:56 PM
I was planning on replacing my files with new ones here in a day or so to have the most updated versions. Ill report back in a couple days

CreedyNZ
09-27-2015, 12:44 AM
Hi,

I've been using the code from here https://github.com/KurtE/Arduino_Phoenix_Parts quite a lot lately and haven't noticed the "crawl bug". The only changes I've made to the code are to accept commands via serial from a RPi (using essentially the standard communication structure), applied the 2-19 servo numbering from Kurt's Rpi version and used a few neopixels for debugging purposes.

So far that Phoenix version above has been working great.

CreedyNZ
09-27-2015, 02:35 PM
Update to my previous post.

This issue got me curious so I tried experimenting and found the bug did in fact appear if I ran my current setup with Double Travel on.

Up until now I'd only been running the command input from the RPi with Double Travel off.

I also tried using the ArbotiX commander and couldn't get the bug to appear even with Double Travel on.

Zenta
09-29-2015, 04:06 PM
What software are you using in the Commander? I usually updated them to my own version which gives me a longer range of values in the joysticks... But I think they should still have the same center locations...

Thanks Kåre, - (Have you seen it on Arbotix and/or Teensy?)

Hi,

It's been a while since my previous post.
Like deathwiz mention the bug is related to large steps. I saw the bug on the float version running Teensy and also modified Commander code for larger range on the gimbals. Do you have a version of your modified commander code on github Kurt? I did get some strange errors (maybe overflow of some sort), So I had to decrease the range on the Right_V from 255 to 254.
I'm also not sure if i only saw the bug when walking upside down only. When I get time I'll look more into this.

KurtEck
09-29-2015, 06:20 PM
Thanks Kåre,

Yep the commander code I was using is up on github: https://github.com/KurtE/CommanderEx

It would be my guess as well that it is some form of overflow.

CreedyNZ
09-29-2015, 07:21 PM
Hi,

Last night I tried slowing, slightly, the frequency of transmission of commands from the RPi to the Arbotix and this appears to have rectified the issue with my current set-up

deathwiz
10-05-2015, 04:57 PM
Is pheonix code able to operate a quad robot? I want to experiment with only 4 legs but I haven't seen anything about this yet.

KurtEck
10-05-2015, 06:08 PM
Yes, there is some Quad support built in. I have tried it on a couple of robots. A PhantomX Quad and a LynxMotion one that used RC servos. Had much better luck with PhantomX.

Example if you look at my github project for PhantomX: https://github.com/KurtE/Phantom_Phoenix
If you look at the program, there are place in the code and config files that look at:
#ifdef QUADMODE

And then configures it for a Quad...