PDA

View Full Version : [Question(s)] Trouble compiling arduino sketch using arbotix commander to control robot



darkback2
12-23-2017, 09:57 PM
What I have done:

I created a series of poses and sequences using pypose and exported them as a .h file.

I then drug up some old arbotix code that is supposed to respond to the commander.



/* ================================================== ======================== */
/* HikariKey/ServoControl
/* This code is a good starting place for using the
/* keyboard of a computer to control servos using the arbotix.
/* Send data in the form of p (servo ID 2 digets) , (goal position 4 digets) CR
/* You can also send it letters from the keyboard and have it play */
/* sequences based on which letters you send it. */
/* If you use this you want to change the "iPoses01.h to whatever
/* your poses are called. You also want to change the if thens to
/* things that make sense to you.
/*
/* This code was written by Darkback2 with more help than not by
/* Chris Novak
/* lnxfergy (Michael Ferguson, inventor of the arbotix)
/* Upgrayd
/* and the rest of the Trossen Robotics Forum.
/* ================================================== ======================== */


#include <ax12.h>
#include <BioloidController.h>
#include <Commander.h>
#include "XPoses.h" // exported from PyPose


BioloidController bioloid = BioloidController(1000000);
Commander command = Commander();


void setup()
{
pinMode(0, OUTPUT); // bah, need to see the LED.


// setup serial
Serial.begin(38400);

// stand up slowly

// recommended pause
delay(100);

bioloid.loadPose(XStanding);
bioloid.readPose();
bioloid.interpolateSetup(5000);

while(bioloid.interpolating > 0)
{
bioloid.interpolateStep();
delay(3);
}
}


void loop()
{
// check for new messages
if(command.ReadMsgs() > 0)
{
// toggle LED so we know johnny5 is alive
digitalWrite(0,HIGH-digitalRead(0));

// only process if we aren't currently doing a sequence
if(bioloid.playing == 0)
{
if(command.walkV > 50)
{
bioloid.playSeq(XFWalkSeq01);
}
else if(command.walkV < -50)
{
bioloid.playSeq(XBWalkSeq01);
}
else if(command.walkH > 50)
{
bioloid.playSeq(XLTurnSeq01);
}
else if(command.walkH < -50)
{
bioloid.playSeq(XRTurnSeq01);
}
else if(command.lookH > 50)
{
bioloid.playSeq(XLCrab01);
}
else if(command.lookH > -50)
{
bioloid.playSeq(XRCrab01);
}
if(command.buttons&BUT_R1)
{
bioloid.playSeq(4LegStanding01);
}

if(command.buttons&BUT_R2)
{
bioloid.playSeq(4LegsUp01);
}

if(command.buttons&BUT_R3)
{
bioloid.playSeq(PoseDeveloper);
}
}
} // moved this one up from below, so that the "play" happens all the time, even if the commander isn't sending at 30hz.

if(bioloid.playing > 0)
{
// continue sequence
bioloid.play();
}
}


xPoses.h


#ifndef EXAIME3_POSES
#define EXAIME3_POSES


#include <avr/pgmspace.h>


PROGMEM prog_uint16_t XStandStep02[] = {24, 2296, 2398, 2058, 1242, 2314, 1645, 1823, 2393, 2042, 1250, 1732, 1642, 2535, 1558, 2391, 2048, 2049, 1616, 1651, 1537, 1728, 2048, 2050, 1540};
PROGMEM prog_uint16_t XFWalk01[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t XFWalk03[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2389, 2048, 1877, 2048, 2218};
PROGMEM prog_uint16_t XFWalk02[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
PROGMEM prog_uint16_t XFWalk05[] = {24, 2562, 2389, 2050, 1877, 2046, 2218, 2050, 2218, 2050, 1877, 2049, 2048, 2046, 2389, 2046, 1877, 2050, 2218, 1536, 2218, 2046, 1877, 2048, 2048};
PROGMEM prog_uint16_t XFWalk04[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t XStandStep04[] = {24, 1515, 2393, 2079, 1242, 2048, 1652, 2529, 2391, 2031, 1246, 2048, 1641, 2547, 1559, 3030, 2048, 2045, 1616, 1586, 1541, 1018, 2039, 2053, 1544};
PROGMEM prog_uint16_t XFWalk06[] = {24, 2048, 2352, 2048, 1857, 2048, 2216, 1563, 2177, 2048, 1859, 2048, 2049, 2560, 2347, 2048, 1853, 2048, 2215, 2048, 2190, 2048, 1862, 2048, 2046};
PROGMEM prog_uint16_t XRTurn04[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218};
PROGMEM prog_uint16_t XLegsUp[] = {24, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048};
PROGMEM prog_uint16_t xStandStep03[] = {24, 2305, 2401, 2068, 1241, 2321, 1652, 1819, 2389, 2039, 1250, 1725, 1646, 2530, 1562, 2414, 2050, 2051, 1614, 1641, 1533, 1562, 2043, 2051, 1542};
PROGMEM prog_uint16_t XRTurn06[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t XRTurn05[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
PROGMEM prog_uint16_t XStandingLegsCompressed[] = {24, 2048, 2330, 2048, 1241, 2048, 1437, 2048, 2324, 2048, 1264, 2048, 1640, 2048, 2208, 2048, 1262, 2048, 1445, 2048, 2267, 2048, 1250, 2048, 1439};
PROGMEM prog_uint16_t XRTurn03[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t XRTurn02[] = {24, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t XRTurn01[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t XStanding[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t XRWalk05[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t XRWalk04[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t HStanding01[] = {24, 1517, 2048, 2078, 2048, 2048, 2048, 2525, 2048, 2035, 2048, 2046, 2048, 2549, 1550, 3019, 2045, 2050, 1618, 1585, 1534, 1029, 2040, 2049, 1545};
PROGMEM prog_uint16_t XRWalk06[] = {24, 1536, 2360, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t XRWalk01[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM prog_uint16_t XRWalk03[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218};
PROGMEM prog_uint16_t XRWalk02[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
PROGMEM prog_uint16_t XDownLegsCompressed01[] = {24, 2043, 2500, 2042, 1875, 2041, 2457, 2118, 2500, 1961, 1875, 2000, 2457, 2064, 2500, 2151, 1875, 2029, 2457, 2035, 2500, 1978, 1875, 2041, 2457};
PROGMEM prog_uint16_t XReadTest[] = {24, 2184, 1550, 1191, 1866, 2046, 2051, 2046, 1544, 2039, 1857, 2050, 2220, 2046, 2199, 2046, 1865, 2048, 2051, 1567, 1548, 2047, 1866, 2045, 1765};
PROGMEM prog_uint16_t XStandstep01[] = {24, 2048, 2400, 2048, 1255, 2320, 1633, 2048, 2400, 2048, 1255, 1728, 1633, 2533, 1562, 2048, 1870, 2048, 1610, 1657, 1539, 2048, 1870, 2048, 1539};
PROGMEM prog_uint16_t XRelax02[] = {24, 2056, 1621, 2043, 2905, 2052, 1521, 2049, 1584, 2042, 2966, 2049, 1528, 2054, 1505, 2046, 3106, 2050, 1615, 2053, 1566, 2041, 3040, 2046, 1578};
PROGMEM prog_uint16_t XRelax01[] = {24, 2047, 2147, 2047, 1997, 2047, 1443, 2050, 2150, 2048, 1982, 2046, 1448, 2046, 2132, 2048, 2008, 2046, 1460, 2049, 2149, 2043, 2033, 2045, 1492};


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
PROGMEM transition_t 4LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };
PROGMEM transition_t PoseDeveloper[] = {{0,6} ,{XStanding,2000} ,{XStandstep01,2000} ,{XStandStep02,2000} ,{xStandStep03,2000} ,{XStandStep04,2000} ,{HStanding01,5000} };
PROGMEM transition_t XLCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk06,500} ,{XRWalk05,500} ,{XRWalk04,500} ,{XRWalk03,500} ,{XRWalk02,500} ,{XRWalk01,500} };
PROGMEM transition_t XRCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk02,500} ,{XRWalk03,500} ,{XRWalk04,500} ,{XRWalk05,500} ,{XRWalk06,500} ,{XRWalk01,500} };
PROGMEM transition_t XFWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk02,500} ,{XFWalk03,500} ,{XFWalk04,500} ,{XFWalk05,500} ,{XFWalk06,500} ,{XFWalk01,500} };
PROGMEM transition_t XRTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn01,500} ,{XRTurn02,500} ,{XRTurn03,500} ,{XRTurn04,500} ,{XRTurn05,500} ,{XRTurn06,500} };
PROGMEM transition_t XLTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn05,500} ,{XRTurn04,500} ,{XRTurn03,500} ,{XRTurn02,500} ,{XRTurn01,500} ,{XStanding,500} };
PROGMEM transition_t 4LegsUp01[] = {{0,2} ,{XStanding,2000} ,{XLegsUp,2000} };
PROGMEM transition_t XRelaxSeq[] = {{0,3} ,{XLegsUp,2000} ,{XRelax01,2000} ,{XRelax02,2000} };
PROGMEM transition_t 4LegStanding01[] = {{0,2} ,{XLegsUp,2000} ,{XStanding,2000} };


#endif



The problem is, it won't compile, and it claims it won't because of problems with the poses.h file.

Here are the errors...

I have no idea what to do here. I'm starting to think it has something to do with the "#include <avr/pgmspace.h>", but I don't know how to fix that.



Arduino: 1.6.13 (Windows 10), Board: "Arbotix-M"


In file included from C:\Users\Che Edoga\Documents\Arduino\XPoseBased02\XPoseBased02. ino:22:0:


XPoses.h:6: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XStandStep02[] = {24, 2296, 2398, 2058, 1242, 2314, 1645, 1823, 2393, 2042, 1250, 1732, 1642, 2535, 1558, 2391, 2048, 2049, 1616, 1651, 1537, 1728, 2048, 2050, 1540};


^


In file included from C:\Users\Che Edoga\Documents\Arduino\XPoseBased02\XPoseBased02. ino:22:0:


XPoses.h:7: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XFWalk01[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:8: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XFWalk03[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:9: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XFWalk02[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:10: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XFWalk05[] = {24, 2562, 2389, 2050, 1877, 2046, 2218, 2050, 2218, 2050, 1877, 2049, 2048, 2046, 2389, 2046, 1877, 2050, 2218, 1536, 2218, 2046, 1877, 2048, 2048};


^


XPoses.h:11: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XFWalk04[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:12: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XStandStep04[] = {24, 1515, 2393, 2079, 1242, 2048, 1652, 2529, 2391, 2031, 1246, 2048, 1641, 2547, 1559, 3030, 2048, 2045, 1616, 1586, 1541, 1018, 2039, 2053, 1544};


^


XPoses.h:13: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XFWalk06[] = {24, 2048, 2352, 2048, 1857, 2048, 2216, 1563, 2177, 2048, 1859, 2048, 2049, 2560, 2347, 2048, 1853, 2048, 2215, 2048, 2190, 2048, 1862, 2048, 2046};


^


XPoses.h:14: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRTurn04[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:15: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XLegsUp[] = {24, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048};


^


XPoses.h:16: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t xStandStep03[] = {24, 2305, 2401, 2068, 1241, 2321, 1652, 1819, 2389, 2039, 1250, 1725, 1646, 2530, 1562, 2414, 2050, 2051, 1614, 1641, 1533, 1562, 2043, 2051, 1542};


^


XPoses.h:17: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRTurn06[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:18: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRTurn05[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:19: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XStandingLegsCompressed[] = {24, 2048, 2330, 2048, 1241, 2048, 1437, 2048, 2324, 2048, 1264, 2048, 1640, 2048, 2208, 2048, 1262, 2048, 1445, 2048, 2267, 2048, 1250, 2048, 1439};


^


XPoses.h:20: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRTurn03[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:21: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRTurn02[] = {24, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:22: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRTurn01[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:23: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XStanding[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:24: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRWalk05[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:25: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRWalk04[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:26: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t HStanding01[] = {24, 1517, 2048, 2078, 2048, 2048, 2048, 2525, 2048, 2035, 2048, 2046, 2048, 2549, 1550, 3019, 2045, 2050, 1618, 1585, 1534, 1029, 2040, 2049, 1545};


^


XPoses.h:27: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRWalk06[] = {24, 1536, 2360, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:28: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRWalk01[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:29: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRWalk03[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:30: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRWalk02[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:31: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XDownLegsCompressed01[] = {24, 2043, 2500, 2042, 1875, 2041, 2457, 2118, 2500, 1961, 1875, 2000, 2457, 2064, 2500, 2151, 1875, 2029, 2457, 2035, 2500, 1978, 1875, 2041, 2457};


^


XPoses.h:32: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XReadTest[] = {24, 2184, 1550, 1191, 1866, 2046, 2051, 2046, 1544, 2039, 1857, 2050, 2220, 2046, 2199, 2046, 1865, 2048, 2051, 1567, 1548, 2047, 1866, 2045, 1765};


^


XPoses.h:33: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XStandstep01[] = {24, 2048, 2400, 2048, 1255, 2320, 1633, 2048, 2400, 2048, 1255, 1728, 1633, 2533, 1562, 2048, 1870, 2048, 1610, 1657, 1539, 2048, 1870, 2048, 1539};


^


XPoses.h:34: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRelax02[] = {24, 2056, 1621, 2043, 2905, 2052, 1521, 2049, 1584, 2042, 2966, 2049, 1528, 2054, 1505, 2046, 3106, 2050, 1615, 2053, 1566, 2041, 3040, 2046, 1578};


^


XPoses.h:35: error: 'prog_uint16_t' does not name a type


PROGMEM prog_uint16_t XRelax01[] = {24, 2047, 2147, 2047, 1997, 2047, 1443, 2050, 2150, 2048, 1982, 2046, 1448, 2046, 2132, 2048, 2008, 2046, 1460, 2049, 2149, 2043, 2033, 2045, 1492};


^


XPoses.h:37: error: variable 'XBWalkSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };


^


XPoses.h:37: error: 'XFWalk01' was not declared in this scope


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };


^


XPoses.h:37: error: 'XFWalk06' was not declared in this scope


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };


^


XPoses.h:37: error: 'XFWalk05' was not declared in this scope


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };


^


XPoses.h:37: error: 'XFWalk04' was not declared in this scope


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };


^


XPoses.h:37: error: 'XFWalk03' was not declared in this scope


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };


^


XPoses.h:37: error: 'XFWalk02' was not declared in this scope


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };


^


XPoses.h:37: error: 'XFWalk01' was not declared in this scope


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };


^


XPoses.h:38: error: expected unqualified-id before numeric constant


PROGMEM transition_t 4LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };


^


Multiple libraries were found for "ax12.h"
Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Bioloid
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Multiple libraries were found for "Commander.h"
Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Commander
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\Commander
exit status 1
'prog_uint16_t' does not name a type


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Any help would be greatly appreciated.

DB

tician
12-24-2017, 12:41 AM
Pretty sure it is just old AVR specific names having been replaced in newer versions. Remove the "prog_" from "prog_uint16_t" and it will probably start working again.

darkback2
12-24-2017, 01:15 AM
Thanks Tician,

Here is what I changed in the xposes.h file:



#ifndef EXAIME3_POSES
#define EXAIME3_POSES


#include <avr/pgmspace.h>


PROGMEM uint16_t XStandStep02[] = {24, 2296, 2398, 2058, 1242, 2314, 1645, 1823, 2393, 2042, 1250, 1732, 1642, 2535, 1558, 2391, 2048, 2049, 1616, 1651, 1537, 1728, 2048, 2050, 1540};
PROGMEM uint16_t XFWalk01[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t XFWalk03[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2389, 2048, 1877, 2048, 2218};
PROGMEM uint16_t XFWalk02[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
PROGMEM uint16_t XFWalk05[] = {24, 2562, 2389, 2050, 1877, 2046, 2218, 2050, 2218, 2050, 1877, 2049, 2048, 2046, 2389, 2046, 1877, 2050, 2218, 1536, 2218, 2046, 1877, 2048, 2048};
PROGMEM uint16_t XFWalk04[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t XStandStep04[] = {24, 1515, 2393, 2079, 1242, 2048, 1652, 2529, 2391, 2031, 1246, 2048, 1641, 2547, 1559, 3030, 2048, 2045, 1616, 1586, 1541, 1018, 2039, 2053, 1544};
PROGMEM uint16_t XFWalk06[] = {24, 2048, 2352, 2048, 1857, 2048, 2216, 1563, 2177, 2048, 1859, 2048, 2049, 2560, 2347, 2048, 1853, 2048, 2215, 2048, 2190, 2048, 1862, 2048, 2046};
PROGMEM uint16_t XRTurn04[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218};
PROGMEM uint16_t XLegsUp[] = {24, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048};
PROGMEM uint16_t xStandStep03[] = {24, 2305, 2401, 2068, 1241, 2321, 1652, 1819, 2389, 2039, 1250, 1725, 1646, 2530, 1562, 2414, 2050, 2051, 1614, 1641, 1533, 1562, 2043, 2051, 1542};
PROGMEM uint16_t XRTurn06[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t XRTurn05[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
PROGMEM uint16_t XStandingLegsCompressed[] = {24, 2048, 2330, 2048, 1241, 2048, 1437, 2048, 2324, 2048, 1264, 2048, 1640, 2048, 2208, 2048, 1262, 2048, 1445, 2048, 2267, 2048, 1250, 2048, 1439};
PROGMEM uint16_t XRTurn03[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t XRTurn02[] = {24, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t XRTurn01[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t XStanding[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t XRWalk05[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t XRWalk04[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t HStanding01[] = {24, 1517, 2048, 2078, 2048, 2048, 2048, 2525, 2048, 2035, 2048, 2046, 2048, 2549, 1550, 3019, 2045, 2050, 1618, 1585, 1534, 1029, 2040, 2049, 1545};
PROGMEM uint16_t XRWalk06[] = {24, 1536, 2360, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t XRWalk01[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
PROGMEM uint16_t XRWalk03[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218};
PROGMEM uint16_t XRWalk02[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
PROGMEM uint16_t XDownLegsCompressed01[] = {24, 2043, 2500, 2042, 1875, 2041, 2457, 2118, 2500, 1961, 1875, 2000, 2457, 2064, 2500, 2151, 1875, 2029, 2457, 2035, 2500, 1978, 1875, 2041, 2457};
PROGMEM uint16_t XReadTest[] = {24, 2184, 1550, 1191, 1866, 2046, 2051, 2046, 1544, 2039, 1857, 2050, 2220, 2046, 2199, 2046, 1865, 2048, 2051, 1567, 1548, 2047, 1866, 2045, 1765};
PROGMEM uint16_t XStandstep01[] = {24, 2048, 2400, 2048, 1255, 2320, 1633, 2048, 2400, 2048, 1255, 1728, 1633, 2533, 1562, 2048, 1870, 2048, 1610, 1657, 1539, 2048, 1870, 2048, 1539};
PROGMEM uint16_t XRelax02[] = {24, 2056, 1621, 2043, 2905, 2052, 1521, 2049, 1584, 2042, 2966, 2049, 1528, 2054, 1505, 2046, 3106, 2050, 1615, 2053, 1566, 2041, 3040, 2046, 1578};
PROGMEM uint16_t XRelax01[] = {24, 2047, 2147, 2047, 1997, 2047, 1443, 2050, 2150, 2048, 1982, 2046, 1448, 2046, 2132, 2048, 2008, 2046, 1460, 2049, 2149, 2043, 2033, 2045, 1492};


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
PROGMEM transition_t 4LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };
PROGMEM transition_t PoseDeveloper[] = {{0,6} ,{XStanding,2000} ,{XStandstep01,2000} ,{XStandStep02,2000} ,{xStandStep03,2000} ,{XStandStep04,2000} ,{HStanding01,5000} };
PROGMEM transition_t XLCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk06,500} ,{XRWalk05,500} ,{XRWalk04,500} ,{XRWalk03,500} ,{XRWalk02,500} ,{XRWalk01,500} };
PROGMEM transition_t XRCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk02,500} ,{XRWalk03,500} ,{XRWalk04,500} ,{XRWalk05,500} ,{XRWalk06,500} ,{XRWalk01,500} };
PROGMEM transition_t XFWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk02,500} ,{XFWalk03,500} ,{XFWalk04,500} ,{XFWalk05,500} ,{XFWalk06,500} ,{XFWalk01,500} };
PROGMEM transition_t XRTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn01,500} ,{XRTurn02,500} ,{XRTurn03,500} ,{XRTurn04,500} ,{XRTurn05,500} ,{XRTurn06,500} };
PROGMEM transition_t XLTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn05,500} ,{XRTurn04,500} ,{XRTurn03,500} ,{XRTurn02,500} ,{XRTurn01,500} ,{XStanding,500} };
PROGMEM transition_t 4LegsUp01[] = {{0,2} ,{XStanding,2000} ,{XLegsUp,2000} };
PROGMEM transition_t XRelaxSeq[] = {{0,3} ,{XLegsUp,2000} ,{XRelax01,2000} ,{XRelax02,2000} };
PROGMEM transition_t 4LegStanding01[] = {{0,2} ,{XLegsUp,2000} ,{XStanding,2000} };


#endif




Now I am getting the following error:



Arduino: 1.6.13 (Windows 10), Board: "Arbotix-M"


In file included from C:\Users\Che Edoga\Documents\Exaime3\XCommander01\XCommander01. ino:22:0:


XPoses.h:6: error: variable 'XStandStep02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XStandStep02[] = {24, 2296, 2398, 2058, 1242, 2314, 1645, 1823, 2393, 2042, 1250, 1732, 1642, 2535, 1558, 2391, 2048, 2049, 1616, 1651, 1537, 1728, 2048, 2050, 1540};


^


In file included from C:\Users\Che Edoga\Documents\Exaime3\XCommander01\XCommander01. ino:22:0:


XPoses.h:7: error: variable 'XFWalk01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XFWalk01[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:8: error: variable 'XFWalk03' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XFWalk03[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:9: error: variable 'XFWalk02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XFWalk02[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:10: error: variable 'XFWalk05' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XFWalk05[] = {24, 2562, 2389, 2050, 1877, 2046, 2218, 2050, 2218, 2050, 1877, 2049, 2048, 2046, 2389, 2046, 1877, 2050, 2218, 1536, 2218, 2046, 1877, 2048, 2048};


^


XPoses.h:11: error: variable 'XFWalk04' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XFWalk04[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:12: error: variable 'XStandStep04' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XStandStep04[] = {24, 1515, 2393, 2079, 1242, 2048, 1652, 2529, 2391, 2031, 1246, 2048, 1641, 2547, 1559, 3030, 2048, 2045, 1616, 1586, 1541, 1018, 2039, 2053, 1544};


^


XPoses.h:13: error: variable 'XFWalk06' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XFWalk06[] = {24, 2048, 2352, 2048, 1857, 2048, 2216, 1563, 2177, 2048, 1859, 2048, 2049, 2560, 2347, 2048, 1853, 2048, 2215, 2048, 2190, 2048, 1862, 2048, 2046};


^


XPoses.h:14: error: variable 'XRTurn04' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRTurn04[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:15: error: variable 'XLegsUp' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XLegsUp[] = {24, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048};


^


XPoses.h:16: error: variable 'xStandStep03' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t xStandStep03[] = {24, 2305, 2401, 2068, 1241, 2321, 1652, 1819, 2389, 2039, 1250, 1725, 1646, 2530, 1562, 2414, 2050, 2051, 1614, 1641, 1533, 1562, 2043, 2051, 1542};


^


XPoses.h:17: error: variable 'XRTurn06' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRTurn06[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:18: error: variable 'XRTurn05' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRTurn05[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:19: error: variable 'XStandingLegsCompressed' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XStandingLegsCompressed[] = {24, 2048, 2330, 2048, 1241, 2048, 1437, 2048, 2324, 2048, 1264, 2048, 1640, 2048, 2208, 2048, 1262, 2048, 1445, 2048, 2267, 2048, 1250, 2048, 1439};


^


XPoses.h:20: error: variable 'XRTurn03' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRTurn03[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:21: error: variable 'XRTurn02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRTurn02[] = {24, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:22: error: variable 'XRTurn01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRTurn01[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:23: error: variable 'XStanding' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XStanding[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:24: error: variable 'XRWalk05' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRWalk05[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:25: error: variable 'XRWalk04' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRWalk04[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:26: error: variable 'HStanding01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t HStanding01[] = {24, 1517, 2048, 2078, 2048, 2048, 2048, 2525, 2048, 2035, 2048, 2046, 2048, 2549, 1550, 3019, 2045, 2050, 1618, 1585, 1534, 1029, 2040, 2049, 1545};


^


XPoses.h:27: error: variable 'XRWalk06' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRWalk06[] = {24, 1536, 2360, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:28: error: variable 'XRWalk01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRWalk01[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};


^


XPoses.h:29: error: variable 'XRWalk03' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRWalk03[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:30: error: variable 'XRWalk02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRWalk02[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};


^


XPoses.h:31: error: variable 'XDownLegsCompressed01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XDownLegsCompressed01[] = {24, 2043, 2500, 2042, 1875, 2041, 2457, 2118, 2500, 1961, 1875, 2000, 2457, 2064, 2500, 2151, 1875, 2029, 2457, 2035, 2500, 1978, 1875, 2041, 2457};


^


XPoses.h:32: error: variable 'XReadTest' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XReadTest[] = {24, 2184, 1550, 1191, 1866, 2046, 2051, 2046, 1544, 2039, 1857, 2050, 2220, 2046, 2199, 2046, 1865, 2048, 2051, 1567, 1548, 2047, 1866, 2045, 1765};


^


XPoses.h:33: error: variable 'XStandstep01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XStandstep01[] = {24, 2048, 2400, 2048, 1255, 2320, 1633, 2048, 2400, 2048, 1255, 1728, 1633, 2533, 1562, 2048, 1870, 2048, 1610, 1657, 1539, 2048, 1870, 2048, 1539};


^


XPoses.h:34: error: variable 'XRelax02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRelax02[] = {24, 2056, 1621, 2043, 2905, 2052, 1521, 2049, 1584, 2042, 2966, 2049, 1528, 2054, 1505, 2046, 3106, 2050, 1615, 2053, 1566, 2041, 3040, 2046, 1578};


^


XPoses.h:35: error: variable 'XRelax01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM uint16_t XRelax01[] = {24, 2047, 2147, 2047, 1997, 2047, 1443, 2050, 2150, 2048, 1982, 2046, 1448, 2046, 2132, 2048, 2008, 2046, 1460, 2049, 2149, 2043, 2033, 2045, 1492};


^


XPoses.h:37: error: variable 'XBWalkSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };


^


XPoses.h:38: error: expected unqualified-id before numeric constant


PROGMEM transition_t 4LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };


^


Multiple libraries were found for "ax12.h"
Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Bioloid
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Multiple libraries were found for "Commander.h"
Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Commander
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\Commander
exit status 1
variable 'XStandStep02' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Not sure I edited things right...

Any advice?

DB

tician
12-24-2017, 02:35 AM
arggh. A pox on old decrepit code and ever changing system standards. Basically, the required magic words for ensuring the compiler sticks these arrays into FLASH instead of RAM seem to keep changing.

Might be
PROGMEM const uint16_t foo[] = ...
or
const uint16_t foo[] __FLASH__ = ...
or possibly
uint16_t foo[] __FLASH__ = ...

edit:
also, the compiler does not like variable names starting with numerals.

KurtEck
12-24-2017, 07:27 AM
What I have in some of my code looks like:

const uint16_t cCoxaMin1[] PROGMEM = {
cRRCoxaMin1, cRMCoxaMin1, cRFCoxaMin1, cLRCoxaMin1, cLMCoxaMin1, cLFCoxaMin1};

Note the cRR...CRM... Are #defines specific for the different robots...

Other solution ;) Go to a processor which does not have the different memory spaces like an ARM board :lol:

darkback2
12-24-2017, 01:10 PM
Progress! I think...

Here is what I edited so far, and here is the error I got.



#ifndef EXAIME3_POSES
#define EXAIME3_POSES


#include <avr/pgmspace.h>


const uint16_t XStandStep02[] = {24, 2296, 2398, 2058, 1242, 2314, 1645, 1823, 2393, 2042, 1250, 1732, 1642, 2535, 1558, 2391, 2048, 2049, 1616, 1651, 1537, 1728, 2048, 2050, 1540};
const uint16_t XFWalk01[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
const uint16_t XFWalk03[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1563, 2389, 2048, 1877, 2048, 2218};
const uint16_t XFWalk02[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
const uint16_t XFWalk05[] = {24, 2562, 2389, 2050, 1877, 2046, 2218, 2050, 2218, 2050, 1877, 2049, 2048, 2046, 2389, 2046, 1877, 2050, 2218, 1536, 2218, 2046, 1877, 2048, 2048};
const uint16_t XFWalk04[] = {24, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048};
const uint16_t XStandStep04[] = {24, 1515, 2393, 2079, 1242, 2048, 1652, 2529, 2391, 2031, 1246, 2048, 1641, 2547, 1559, 3030, 2048, 2045, 1616, 1586, 1541, 1018, 2039, 2053, 1544};
const uint16_t XFWalk06[] = {24, 2048, 2352, 2048, 1857, 2048, 2216, 1563, 2177, 2048, 1859, 2048, 2049, 2560, 2347, 2048, 1853, 2048, 2215, 2048, 2190, 2048, 1862, 2048, 2046};
const uint16_t XRTurn04[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2389, 2048, 1877, 2048, 2218};
const uint16_t XLegsUp[] = {24, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048, 2048, 2457, 2048, 2048, 2048, 2048};
const uint16_t xStandStep03[] = {24, 2305, 2401, 2068, 1241, 2321, 1652, 1819, 2389, 2039, 1250, 1725, 1646, 2530, 1562, 2414, 2050, 2051, 1614, 1641, 1533, 1562, 2043, 2051, 1542};
const uint16_t XRTurn06[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
const uint16_t XRTurn05[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
const uint16_t XStandingLegsCompressed[] = {24, 2048, 2330, 2048, 1241, 2048, 1437, 2048, 2324, 2048, 1264, 2048, 1640, 2048, 2208, 2048, 1262, 2048, 1445, 2048, 2267, 2048, 1250, 2048, 1439};
const uint16_t XRTurn03[] = {24, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2218, 2048, 1877, 2048, 2048, 2218, 2218, 2048, 1877, 2048, 2048};
const uint16_t XRTurn02[] = {24, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048, 1877, 2389, 2048, 1877, 2048, 2218, 2218, 2218, 2048, 1877, 2048, 2048};
const uint16_t XRTurn01[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
const uint16_t XStanding[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
const uint16_t XRWalk05[] = {24, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2389, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048};
const uint16_t XRWalk04[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048};
const uint16_t HStanding01[] = {24, 1517, 2048, 2078, 2048, 2048, 2048, 2525, 2048, 2035, 2048, 2046, 2048, 2549, 1550, 3019, 2045, 2050, 1618, 1585, 1534, 1029, 2040, 2049, 1545};
const uint16_t XRWalk06[] = {24, 1536, 2360, 2048, 1877, 2048, 2218, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048};
const uint16_t XRWalk01[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2218, 2048, 1877, 2048, 2048};
const uint16_t XRWalk03[] = {24, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218};
const uint16_t XRWalk02[] = {24, 1536, 2218, 2048, 1877, 2048, 2048, 2560, 2389, 2048, 1877, 2048, 2218, 2048, 2218, 2048, 1877, 2048, 2048, 2048, 2389, 2048, 1877, 2048, 2218};
const uint16_t XDownLegsCompressed01[] = {24, 2043, 2500, 2042, 1875, 2041, 2457, 2118, 2500, 1961, 1875, 2000, 2457, 2064, 2500, 2151, 1875, 2029, 2457, 2035, 2500, 1978, 1875, 2041, 2457};
const uint16_t XReadTest[] = {24, 2184, 1550, 1191, 1866, 2046, 2051, 2046, 1544, 2039, 1857, 2050, 2220, 2046, 2199, 2046, 1865, 2048, 2051, 1567, 1548, 2047, 1866, 2045, 1765};
const uint16_t XStandstep01[] = {24, 2048, 2400, 2048, 1255, 2320, 1633, 2048, 2400, 2048, 1255, 1728, 1633, 2533, 1562, 2048, 1870, 2048, 1610, 1657, 1539, 2048, 1870, 2048, 1539};
const uint16_t XRelax02[] = {24, 2056, 1621, 2043, 2905, 2052, 1521, 2049, 1584, 2042, 2966, 2049, 1528, 2054, 1505, 2046, 3106, 2050, 1615, 2053, 1566, 2041, 3040, 2046, 1578};
const uint16_t XRelax01[] = {24, 2047, 2147, 2047, 1997, 2047, 1443, 2050, 2150, 2048, 1982, 2046, 1448, 2046, 2132, 2048, 2008, 2046, 1460, 2049, 2149, 2043, 2033, 2045, 1492};


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };
PROGMEM transition_t LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };
PROGMEM transition_t PoseDeveloper[] = {{0,6} ,{XStanding,2000} ,{XStandstep01,2000} ,{XStandStep02,2000} ,{xStandStep03,2000} ,{XStandStep04,2000} ,{HStanding01,5000} };
PROGMEM transition_t XLCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk06,500} ,{XRWalk05,500} ,{XRWalk04,500} ,{XRWalk03,500} ,{XRWalk02,500} ,{XRWalk01,500} };
PROGMEM transition_t XRCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk02,500} ,{XRWalk03,500} ,{XRWalk04,500} ,{XRWalk05,500} ,{XRWalk06,500} ,{XRWalk01,500} };
PROGMEM transition_t XFWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk02,500} ,{XFWalk03,500} ,{XFWalk04,500} ,{XFWalk05,500} ,{XFWalk06,500} ,{XFWalk01,500} };
PROGMEM transition_t XRTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn01,500} ,{XRTurn02,500} ,{XRTurn03,500} ,{XRTurn04,500} ,{XRTurn05,500} ,{XRTurn06,500} };
PROGMEM transition_t XLTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn05,500} ,{XRTurn04,500} ,{XRTurn03,500} ,{XRTurn02,500} ,{XRTurn01,500} ,{XStanding,500} };
PROGMEM transition_t LegsUp01[] = {{0,2} ,{XStanding,2000} ,{XLegsUp,2000} };
PROGMEM transition_t XRelaxSeq[] = {{0,3} ,{XLegsUp,2000} ,{XRelax01,2000} ,{XRelax02,2000} };
PROGMEM transition_t LegStanding01[] = {{0,2} ,{XLegsUp,2000} ,{XStanding,2000} };


#endif




Arduino: 1.6.13 (Windows 10), Board: "Arbotix-M"


In file included from C:\Users\Che Edoga\Documents\Exaime3\XCommander01\XCommander01. ino:22:0:


XPoses.h:37: error: variable 'XBWalkSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t XBWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk06,500} ,{XFWalk05,500} ,{XFWalk04,500} ,{XFWalk03,500} ,{XFWalk02,500} ,{XFWalk01,500} };


^


XPoses.h:38: error: variable 'LegSeqTest01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t LegSeqTest01[] = {{0,5} ,{XStanding,2000} ,{XDownLegsCompressed01,2000} ,{XLegsUp,2000} ,{XStandingLegsCompressed,5000} ,{XStanding,2000} };


^


XPoses.h:39: error: variable 'PoseDeveloper' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t PoseDeveloper[] = {{0,6} ,{XStanding,2000} ,{XStandstep01,2000} ,{XStandStep02,2000} ,{xStandStep03,2000} ,{XStandStep04,2000} ,{HStanding01,5000} };


^


XPoses.h:40: error: variable 'XLCrab01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t XLCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk06,500} ,{XRWalk05,500} ,{XRWalk04,500} ,{XRWalk03,500} ,{XRWalk02,500} ,{XRWalk01,500} };


^


XPoses.h:41: error: variable 'XRCrab01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t XRCrab01[] = {{0,7} ,{XRWalk01,500} ,{XRWalk02,500} ,{XRWalk03,500} ,{XRWalk04,500} ,{XRWalk05,500} ,{XRWalk06,500} ,{XRWalk01,500} };


^


XPoses.h:42: error: variable 'XFWalkSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t XFWalkSeq01[] = {{0,7} ,{XFWalk01,500} ,{XFWalk02,500} ,{XFWalk03,500} ,{XFWalk04,500} ,{XFWalk05,500} ,{XFWalk06,500} ,{XFWalk01,500} };


^


XPoses.h:43: error: variable 'XRTurnSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t XRTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn01,500} ,{XRTurn02,500} ,{XRTurn03,500} ,{XRTurn04,500} ,{XRTurn05,500} ,{XRTurn06,500} };


^


XPoses.h:44: error: variable 'XLTurnSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t XLTurnSeq01[] = {{0,7} ,{XStanding,500} ,{XRTurn05,500} ,{XRTurn04,500} ,{XRTurn03,500} ,{XRTurn02,500} ,{XRTurn01,500} ,{XStanding,500} };


^


XPoses.h:45: error: variable 'LegsUp01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t LegsUp01[] = {{0,2} ,{XStanding,2000} ,{XLegsUp,2000} };


^


XPoses.h:46: error: variable 'XRelaxSeq' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t XRelaxSeq[] = {{0,3} ,{XLegsUp,2000} ,{XRelax01,2000} ,{XRelax02,2000} };


^


XPoses.h:47: error: variable 'LegStanding01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


PROGMEM transition_t LegStanding01[] = {{0,2} ,{XLegsUp,2000} ,{XStanding,2000} };


^


Multiple libraries were found for "Commander.h"
Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Commander
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\Commander
Multiple libraries were found for "ax12.h"
Used: C:\Users\Che Edoga\Documents\Arduino\libraries\Bioloid
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
Not used: C:\Users\Che Edoga\AppData\Local\Arduino15\packages\arbotix\har dware\avr\0.0.2\libraries\ArbotiX
exit status 1
variable 'XBWalkSeq01' must be const in order to be put into read-only section by means of '__attribute__((progmem))'


This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.




Question...

Do I change the "PROGMEM transition_t" to "const uint16_t" ? Figure I have to change it to something because PROGMEM seems to be the problem?

Also, thank you all for the help. I've been away too long!

DB

darkback2
12-24-2017, 02:37 PM
I'm coming to understand the world has moved on and I have become dinosaur. Where did the world go? What dynamixel controller are people currently using?

Also Still looking for help with the above.

DB

KurtEck
12-24-2017, 03:48 PM
You need to add more const declarations. And in the case you mentioned transistion_t is a type so you do not want to change it.

darkback2
12-24-2017, 04:26 PM
You need to add more const declarations. And in the case you mentioned transistion_t is a type so you do not want to change it.

I'm sorry, I don't know enough to understand what that means...Do I change "PROGMEM transition_t" to "const transition_t"? or "const PROGMEM transition_t"

Thanks in advanced.

DB

tician
12-24-2017, 05:34 PM
Seems to be:

const uint16_t foo[] PROGMEM =
and

const transition_t foo[] PROGMEM =

And I was not cursing your use of the arbotix or Pypose, but simply Pypose for not being updated in several years while Arduino and gcc keep changing.

Meant to add this in a comment on the arbotix debug thread, but lost my firefox session and forgot...

YAY! DB is back!

darkback2
12-24-2017, 05:59 PM
ITS ALIVE!!!!!!!

Thank you guys! Best Christmas Present Ever!

DB

darkback2
12-24-2017, 09:35 PM
:-( Tician...I am not back. I have this small 2 week window between my robotics team's FIRST Tech Challenge season, and our FIRST Robotics competition season...That and my kids are building two houses in March so... :-(

Ok... To the second question.

What do I switch to in terms of processor that other people are using?

DB

tician
12-24-2017, 10:07 PM
:-( Tician...I am not back. I have this small 2 week window between my robotics team's FIRST Tech Challenge season, and our FIRST Robotics competition season...That and my kids are building two houses in March so... :-(
Oh, poo. Well, if you ever need any tech advice for your FIRST teams, there are still several knowledgeable folks around these parts.

As for processors, it mostly seems to be Teensy-3.x and/or embedded PC (RPi, etc.) with fully custom code or KurtEck's Phoenix engine. I still haven't found the motivation to get my gait seeker to a functional state, so Ripley is still sitting in her box waiting for a new torso and head so she can start walking around bothering the two ~16lbs cats (the fluffy one may be joining my sister's friend on a farm on an island in the Seattle, WA area).

darkback2
12-25-2017, 12:25 AM
I do pop by and lurk from time to time...

My current personal fleet:

Hikar: Arbotix 2 and embedded FITPC 2 running windows performance edition and MAX/MSP

A knock off of an HROS-1.

and X currently running an arbotix-m thought I have an arbotix pro and Raspberry Pi, sitting here, though I also want to get a second HROS-1 up and running for my classroom.

A part of me wonders if things haven't taken a step backwards over the past few years, or at least sideways...ROS was supposed to be the answer to everything, but I wonder if it hasn't really left a bunch of people behind. I remember going to robogames and watching people with kondos, robonovas, and bioloids having fights...The thing is...Last year a lot of the same people were there running similar robots. Hell the guy with the robonova was just as competitive as he was 10 years ago.

Everything and everyone just seams a lot older now. Myself included...and things are starting to not work. Maybe I just need to dig into ROS like its nobodies business...

Meh...I probably just need another beer.

DB

darkback2
12-25-2017, 08:35 PM
In the name of making things better instead of just complaining about them I am thinking of editing Pypose so that it will export files correctly. Here is what I think I need to change, but I would love confirmation before I screw things up.

Current export part of project file in Pypose folder:


################################################## #########################
# Export functionality
def export(self, filename):
""" Export a pose file for use with Sanguino Library. """
posefile = open(filename, "w")
print>>posefile, "#ifndef " + self.name.upper() + "_POSES"
print>>posefile, "#define " + self.name.upper() + "_POSES"
print>>posefile, ""
print>>posefile, "#include <avr/pgmspace.h>"
print>>posefile, ""
for p in self.poses.keys():
if p.startswith("ik_"):
continue
print>>posefile, "PROGMEM prog_uint16_t " + p + "[] = {" + str(self.count) + ",",
p = self.poses[p]
for x in p[0:-1]:
print>>posefile, str(x) + ",",
print>>posefile, str(p[-1]) + "};"
#print>>posefile, ""
print>>posefile, ""
for s in self.sequences.keys():
print>>posefile, "PROGMEM transition_t " + s + "[] = {{0," + str(len(self.sequences[s])) + "}",
s = self.sequences[s]
for t in s:
print>>posefile, ",{" + t[0:t.find("|")] + "," + t[t.find("|")+1:] + "}",
print>>posefile, "};"
print>>posefile, ""
print>>posefile, "#endif"
posefile.close()


def extract(li):
""" extract x%256,x>>8 for every x in li """
out = list()
for i in li:
out = out + [i%256,i>>8]
return out


Proposed change:


################################################## #########################
# Export functionality
def export(self, filename):
""" Export a pose file for use with Sanguino Library. """
posefile = open(filename, "w")
print>>posefile, "#ifndef " + self.name.upper() + "_POSES"
print>>posefile, "#define " + self.name.upper() + "_POSES"
print>>posefile, ""
print>>posefile, "#include <avr/pgmspace.h>"
print>>posefile, ""
for p in self.poses.keys():
if p.startswith("ik_"):
continue
print>>posefile, "const uint16_t " + p + "[] PROGMEM = {" + str(self.count) + ",",
p = self.poses[p]
for x in p[0:-1]:
print>>posefile, str(x) + ",",
print>>posefile, str(p[-1]) + "};"
#print>>posefile, ""
print>>posefile, ""
for s in self.sequences.keys():
print>>posefile, "const transition_t " + s + "[] PROGMEM = {{0," + str(len(self.sequences[s])) + "}",
s = self.sequences[s]
for t in s:
print>>posefile, ",{" + t[0:t.find("|")] + "," + t[t.find("|")+1:] + "}",
print>>posefile, "};"
print>>posefile, ""
print>>posefile, "#endif"
posefile.close()


def extract(li):
""" extract x%256,x>>8 for every x in li """
out = list()
for i in li:
out = out + [i%256,i>>8]
return out


Basically I am trying to update the export function so that it exports the file in the right format...that would eliminate a lot of changing things by hand, and would make pypose useful again for more than just me...provided more than just me is using it.

Here is the thing...I don't know much about anything so I'm not sure what to do after making these changes...Would this be the right thing to change? I'm assuming it would have to be compiled afterwards...I have friends who know this sort of thing, I am not one of them...

DB

DB

KurtEck
12-26-2017, 09:16 AM
Hi @darkback,

Sorry I am not a python person either. But my quick look through it looks reasonable. I would say try it out on some simple project and see if what is produced compiles...

As for which processor to use...

As you maybe can tell, I personally like to use Teensy processors by PJRC. But they don't come out of the box ready to run Dynamixel servos. You can get them to work with a simple wiring hookup. Connect a TX pin from one of the UARTS and an GND pin to a Trossen wired HUB... I have code that takes care of the Half duplex for you. Or preferably use a carrier board. I have played around with my own boards and I a few others have done so as well, like @jwatte.

Right now I am playing around with some of the OpenCM9 boards, as they are cheap ($20): http://www.trossenrobotics.com/open-cm-904c

However the current C boards do not have any AX/MX servo connectors on them. There are a few options, that I have mentioned on the thread: http://forums.trossenrobotics.com/showthread.php?15777-Open-CM9-04-How-to-connect-to-AX-(or-MX)-servos
One possibility is to purchase the A version of the board: http://www.robotis.us/opencm9-04-a-no-connectors-onboard/ ($10 out of stock) plus the connectors kit ($6) http://www.robotis.us/opencm9-04-connectors-and-accessory-set/ which comes with the two different types of connectors, but this requires you to solder it together... Easiest is to make an adapter cable, from XL to AX/MX and plug this into powered AX/MX HUB.

As for ROS? I keep meaning to get back into learning it again. But as you implied there is a large learning curve and depending on what you are wishing to do with it, it may or may not be worth the investment... I keep meaning to maybe pick up one of the cheaper Turtlebots and work with it as a way to get more used to ROS.

Kurt

darkback2
12-30-2017, 12:45 AM
I made the changes in the pypose program and now the exported .h files compile in Arduino 1.6. Does anyone know how to spread the fixes so that any other people using the Arbotix-m and pypose can get things working also without having to edit their .h files in order to make them work?

DB

KurtEck
12-30-2017, 09:06 AM
First question would be where did you get the pypose from?
Maybe from Here? https://github.com/vanadiumlabs/pypose

The difficulty is it does not look like Fergy is active at all on this any more.

The typical things you can do is to create a new issue up on their github project. Preferably with the code.

Or what I typically do is to create a Pull Request with the new code. The typical steps to do this include:

Create a fork of their project and down load the fork to your machine

Create a new branch for your changes.

Push your changes back up to your github account.

Issue the Pull Request with this new branch and put details in the comments about what was changed and why.

Then hope someone with write access (Michael Ferguson) will take in the pull request.

darkback2
12-30-2017, 05:13 PM
Cool and Thanks.

I don't know that I know enough to do that, but I do know people who do. In the mean time I sent an email to Trossen with the changes...If they are selling the arbotix-m then they should probably be able to get the files updated...If they care of course...

DB