Page 4 of 5 FirstFirst 12345 LastLast
Results 31 to 40 of 41

Thread: Phantom_Phoenix on OpenCM 9.04...

  1. Re: Phantom_Phoenix on OpenCM 9.04...

    Ok thanks for the debug tips. I'll work through it as suggested.
    The Pixy2 Hello world example works fine and I can see output on tracked objects. I'm using the SPI interface as it was the fastest after the USB. The problem occurred when we added a Pixy wrapper class to the Phoenix code and called some of the Pixy functions. I've got the serial output working over the Xbees so I'll add some Serial.Prints and try to locate the point where it crashes.

  2. #32

    Re: Phantom_Phoenix on OpenCM 9.04...

    One thing I always worry about when adding new stuff, is how much memory am I using and when things act strange, then I look to see if I think I am getting close to running out of memory or worse....

    I hit that issue a few times with the OpenCM board, especially using some of their system libraries like Dynamixel SDK and especially Dynamixel Workbench. I helped resolve some of these...

    One thing I have done to help with this, is a quick and dirty memory test. The code detects how big the heap has grown and tries to guess worst case stack usage.

    What it does is at init time, I have a function that fills all of the memory between the stack and the hep with a specific value, and then when I call another function, it prints out the current size of the heap, plus then works its way back from the heap until it finds a value that is not our init value and assumes the stack got to there...

    In my Open_CM_CR_Arduino_Sketches project:, I have this code as part of the AX12_test_OpenCM sketch. At some point I will try to integrate something like this into Phoenix code base there as well, as to find out how close we are to using all of the memory.

    The good news is it looks like Robotis has released updated versions of OpenCM and OpenCR Arduino boards... So most of my changes are now in the main released code bases.

  3. #33

    Re: Phantom_Phoenix on OpenCM 9.04...

    Quick update: I was able to push up a changed OpenCM/CR version of Phantom_Phoenix code with the code to try to estimate how much stack and heap space are used...

  4. Re: Phantom_Phoenix on OpenCM 9.04...

    I'm considering purchasing a Phantom X Mark III with AX-18A servos. I'm interested in autonomous control with Arduino and/or Raspberry Pi. It looks like your Phoenix project is the way to go. Would you recommend starting with OpenCM 9.04 or should I initially go with the older Arbotix-M?

  5. #35

    Re: Phantom_Phoenix on OpenCM 9.04...

    Sorry I did not see this posting for a few days.

    Was busy with season, puppy and power outage...

    Personally I would go with the OpenCM9.04 as there is support for it and it is a more powerful processor... As for control using RPI, another option with the RPI is to use an USB2AX to talk with the RPI to the servos or an Robotis U2D2 I think it is.

  6. Re: Phantom_Phoenix on OpenCM 9.04...

    I've migrated from ArbotixM to OpenCM 9.04 for my Hexapod with Kurt's help and generally have been happy with the move. I did it mainly because I wanted more uarts. The ArbotixM is severely constrained by only having 2 serial ports while the 9.04 has 4 if you count the USB.
    I've successfully used a PI0 for wireless programming via the USB and the 9.04 has Bluetooth capability via a BT-210 adaptor although that uses up a UART. I'm hoping to be able to program via the Bluetooth interface but have yet to test that.
    Robotis have provided good support for the questions I have raised and it is better documented than the ArbotixM which has no support in my experience. The only drawback with the 9.04 is the limited number of 5v and ground pins. I'm currently using an old ArbotixM as the 5v supply for my sensors as well as 12v for some of the AX12As. You'll definitely need a power bus for the AX servos. One of the Trossen ones or similar. The only other issue is that the Processor the 9.04 is not fully compatible with Arduino. I've found some Pixy2 code won't compile but it not a big issue as its to do with the line tracking which I don't use. You also need to consider how to mount the 9.04. A 3D printer would be useful. Hope this helps your decision

  7. #37

    Re: Phantom_Phoenix on OpenCM 9.04...

    Hi Xenoc,

    Glad you have it working. I have not tried programming the OpenCM board over BT (Serial2). Not sure if it is doable or not.

    Yes the support for the OpenCM board is better than it is for the Arbotix board. With the Arbotix boards, the only support is unofficial and done by a few of us on the forums. With the Robotis board, there is also support from some of the forum members again including myself, as well as some developers at Robotis and someone whose job actually includes supporting their forum.

    As I mentioned recently, they have recently updated their Arduino board release (update through Arduino board manager), which has some improvements including a few I did like Asynch Serial outputs, fixes to EEPROM code, some speed ups, memory reductions...

    As for the board not being 100% compatible with Arduino. Yes being a 32 bit ARM based board versus an 8 bit AVR board does impact some code that is written specifically using AVR registers and the like.

    And actually the Pixy code that is not working does not actually have anything to do with the workings of the camera, but instead some support function for their line tracking example. Would not be hard to make it work. Note: it very likely would not work with some other official Arduino boards, like it might not work with Due, or M0, or ... Which are also ARM based boards.

    Note: I personally like using chips made by PJRC (Teensy LC, 3.2, 3.5, 3.6 and at some point 4.0) which are also ARM based. There has been a lot of time and energy making these more compatible with ARM boards, by emulating some of the registers and the like, and also working with 3rd party developers to add support into their libraries, but you still run into compatibility issues.

    As for 5v and GND, Yes they only have maybe 2 5v pins and a few ground pins. Might need to use a secondary board to provide additional ones. These days I am mainly going to sensors that support 3.3v. But again, never enough power and ground pins. Would not be hard to create a simple board, that just has these...

    As to power bus, a few different options. Obviously you could simply use the Robotis OpenCM 485 expansion board, which has 5 AX/MX servo connectors, it also has connectors for the servo power, with some additional power support features. I have used the Trossen powered AX hub for this. Where if you simply power the Hub, which works. I have made my own version, which has an additional connector (XL320 type), so you can simply use an XL320 jumper cable to connect to default OpenCM9.04c board to power it. Trossen may use it at some point...

    You could use the Robotis which powers the power buss. ...

    3D printers are nice to use. As for mounting board. Could 3d print adapter. Could use some of Robotis 12mm rivets and plates, or you might be able to use some of the Robotis PCB supports, which they use to mount other boards on a TB3,

  8. Re: Phantom_Phoenix on OpenCM 9.04...

    Hi Kurt,
    Thanks for that post. The Robotis PCB Supports look good. I'll give them a try as I have several boards now which don't have the 1cm spacing. I'm not quite ready to invest in a 3D printer yet.
    I did update the 9.04 board through the board manager so thanks for that too.
    I've been building a pan/tilt mount for the Lidar and the Pixy using 2 x AX12As. Finally got it all mounted on the Phantom and the wiring sorted out. Nex step is to integrate it into the Phoenix code. Is there much support for pan/tilt in the code. I've seen mention of turrets but haven't gone into the detail yet. Any existing code I can leverage off would be good. I'm assuming I'll program the AX12s as 20 and 21 given that I start at 2.

  9. #39

    Re: Phantom_Phoenix on OpenCM 9.04...

    Hi again, I believe the code still has some Turret support in it.

    Look through the places that have things like:
    #ifdef cTurretRotPin

    I think if you define it to do rotation (pan) and cTurretTiltPin for the tilt, then there will be some code defined. I don't remember if there is any code in the current input code to control it or not. My PhantomX used to have a pan and tilt, so hopefully so.

    Looks like new OpenCM and OpenCR boards were released again, wonder what was updated. Hopefully fixed some compatibility issues I noticed for Dynamixel SDK and Workbench...

  10. Re: Phantom_Phoenix on OpenCM 9.04...

    Hi Kurt,
    Thanks I uncommented the section to define the Turret pins and it works fine. I can do the pan and tilt from the Commander in Walk mode 3. It's very smooth. Good coding that I can leverage off for the autonomous mode. I'll check the new board releases too.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. OpenCM 9.04 iwdg
    By lpala in forum Arbotix, Microcontrollers, Arduino
    Replies: 0
    Last Post: 07-28-2017, 12:32 PM
  2. OpenCM 9.04, best way to beep?
    By jwatte in forum DYNAMIXEL & Robot Actuators
    Replies: 10
    Last Post: 04-09-2017, 12:11 PM
  3. Question(s) Is my OpenCM 9.04 dead? Or do are my AX-12A servos?
    By corot in forum DYNAMIXEL & Robot Actuators
    Replies: 4
    Last Post: 10-31-2016, 04:54 PM
  4. Acceleration implementation on OpenCM?
    By jomo in forum DYNAMIXEL & Robot Actuators
    Replies: 4
    Last Post: 05-19-2016, 07:18 AM
  5. OpenCM IDE (Ubuntu 14.04)
    By rasheinstein in forum Arbotix, Microcontrollers, Arduino
    Replies: 2
    Last Post: 04-12-2016, 12:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts