Botboarduino + SSC32U 24DoF Hexapod

Dear all,

Long time ago, I built the THEX 24DoF and PS2 with success, using Basic Atom.
Now, using the Botboarduino and the SSC32U tring to do the same, I am not able to compile the code ported from the Basic Atom to the Arduino.
I have multiples errors…But as you said in the rezadme, the 24DoF code isn’t really tested nor approved.


/usr/share/arduino/hardware/tools/avr/bin/avr-g++ -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=105 -D__PROG_TYPES_COMPAT__ -I/usr/share/arduino/hardware/arduino/cores/arduino -I/usr/share/arduino/hardware/arduino/variants/standard -I/home/tux/Prog/Arduino/sketchbook/libraries/PS2X_lib -I/usr/share/arduino/libraries/SoftwareSerial /tmp/build968318023971296984.tmp/phoenix_driver_ssc32.cpp -o /tmp/build968318023971296984.tmp/phoenix_driver_ssc32.cpp.o 
In file included from /usr/share/arduino/hardware/arduino/cores/arduino/Arduino.h:8:0,
			 from phoenix_driver_ssc32.cpp:8:
phoenix_driver_ssc32.cpp: In member function ‘void ServoDriver::OutputServoInfoForLeg(byte, short int, short int, short int, short int)’:
phoenix_driver_ssc32.cpp:235:30: error: ‘cTarsLength’ was not declared in this scope
    if ((byte)pgm_read_byte(&cTarsLength[LegIndex])) {
					    ^
phoenix_driver_ssc32.cpp: In member function ‘void ServoDriver::FindServoOffsets()’:
phoenix_driver_ssc32.cpp:366:64: warning: deprecated conversion from string constant to ‘char*’ -Wwrite-strings]
    static char *apszLegs] = {"RR","RM","RF", "LR", "LM", "LF"};  // Leg Order
												   ^
phoenix_driver_ssc32.cpp:366:64: warning: deprecated conversion from string constant to ‘char*’ -Wwrite-strings]
phoenix_driver_ssc32.cpp:366:64: warning: deprecated conversion from string constant to ‘char*’ -Wwrite-strings]
phoenix_driver_ssc32.cpp:366:64: warning: deprecated conversion from string constant to ‘char*’ -Wwrite-strings]
phoenix_driver_ssc32.cpp:366:64: warning: deprecated conversion from string constant to ‘char*’ -Wwrite-strings]
phoenix_driver_ssc32.cpp:366:64: warning: deprecated conversion from string constant to ‘char*’ -Wwrite-strings]
phoenix_driver_ssc32.cpp:367:71: warning: deprecated conversion from string constant to ‘char*’ -Wwrite-strings]
    static char *apszLJoints] = {" Coxa", " Femur", " Tibia", " tArs"}; // which joint on the leg...
														^
phoenix_driver_ssc32.cpp:367:71: warning: deprecated conversion from string constant to ‘char*’ -Wwrite-strings]
phoenix_driver_ssc32.cpp:367:71: warning: deprecated conversion from string constant to ‘char*’ -Wwrite-strings]
phoenix_driver_ssc32.cpp:367:71: warning: deprecated conversion from string constant to ‘char*’ -Wwrite-strings]
phoenix_driver_ssc32.cpp:376:9: warning: unused variable ‘ich’ -Wunused-variable]
    int ich;
	   ^

Could you help me and see what’s going wrong with the code you posted in the GIT ?

github.com/Lynxmotion/3DOF-4DOF … tBoarduino

Thank you a lot for your kinf answer.

Regards,

Christophe

Hi Christophe,

It does seem like there was 2 small issues with the 4 DoF version of the code. There was a typo with one global variable and also a missing extern declaration missing in the servo driver

We have updated the code on GitHub (including the ZIP files, for easy download). We did not test the code at this time, but it does (seem to) compile properly, at least.

Of course, you may have to go in the header files and change some constants to adjust the gait for the physical shape of your hexapod. But, it should at least roughly work out-of-the-box, if not very efficiently.

Let us know how well that works out for you.

Sincerely,

Thank you Sébastien for your kindly help.

I will test your solution tomorrow and I will give you back an answer.

Kind regards,

Hi Sébastien,

Thanks a lot for your reply.
I Compiled the code without error, thank you a lot one more time.

Just a question:

According the 24DoF Hexapod from Lynxmotion, I would like to sum a Lidar Lite to give it some “liberty”, and may be launch the Hexapod in a standalone mode.
I mean the robot will be able to walk alone, and avoid some natural obstacles.
Do you know if the code you gave me could be adapted to my project or if something does exist yet ?

Thank you and best wishes.

Christophe

The code provided can certainly be modified, as even on the Arduino Uno (rather small amount of flash/RAM), there is still some space left after all that code is stored.

Here are the details we get for compilation of the example code (4 DoF version):

So, if you wanted to do something basic, like move forward and dodge walls, you could probably pull it off with the Uno if you use your space carefully. You could maybe even add a bit more behavior, too.
If you wish to have more complex behaviors or sensors (or both!), we would recommend trying it out with an Arduino Mega 2560 instead, since it has quite a bit more flash/RAM available for complex projects (~x8 flash, x4 RAM).

Please note that this would not be a trivial modification, though. You would have to identify how the code is controlled by the PS2 controller and replace those controls with autonomous behavior. Of course, this will most likely be very interesting, too! :slight_smile:

Feel free to post about your results here.

Sincerely,

Hi Sébastien,

Thanks for your kind reply.

Yes, I will do it because I want to use the Hexapod in an uncontrolled / unknow environment.
This is why I would like to sum some stuff like a Lidar Lite to avoid obstacles, an IMU (9 dof) for controlling the hexapod balance and a webcam, a GPRS and a GPS for transmitting location.

I am not sure to use an Arduino to achieve this project. I will prefer the BeagleBone Black and another one to control the video process send by the webcam with OpenCV.

So, let me some time…a lot to be realist and I will send you videos and code if everything is fine.

Regards,

Hi Christophe,

If you intend to use the BBB, you may want to have a look at the GitHub repository of kurte-u381. He is the person who completed the conversion of the Phoenix code from the BotBoard (Basic Micro) to the BotBoarduino (C/Arduino Sketch).

You can find his current work in progress here. It is meant for the Raspberry Pi SBC (Single Board Computer), but he also recently added support for the BBB. This would probably be a good starting point for you instead of creating it from scratch.

Sincerely,

Hi Sébastien,

Thank you very much for this useful information.

Keep in touch !

Regards,