Hello, folks!

2011/1/11 Alex Joni <[email protected]>:
> Btw, all this talk should be moved to the emc-developers list...

Following Alex's suggestion, I shall continue the previous
conversation of genserkins on this list.

> I would write it like this:
>
> for (t = 0; t < GENSER_MAX_JOINTS; t++) {
>    genser->links[t].u.dh.a = A(t);
>    genser->links[t].u.dh.alpha = ALPHA(t);
>    genser->links[t].type = GO_LINK_DH;
>    if (TYPE(t) == 0) {
>        genser->links[t].u.dh.d = 0;
>        genser->links[t].u.dh.theta = THETA(t);
>        genser->links[t].quantity = GO_QUANTITY_LENGTH;
>    } else {
>        genser->links[t].u.dh.d = D(t);
>        genser->links[t].u.dh.theta = 0;
>        genser->links[t].quantity = GO_QUANTITY_ANGLE;
>    }
> }

Thanks!!! I had some problem with the line  if (TYPE(t) = 0), when I
tried to sudo comp --install genserkins.c, but now it is o.k. for this
line.

I still am getting message in terminal that default type and theta
values are not defind:

water...@waterjet:~/emc2-dev/src/emc/kinematics$ sudo comp --install
genserkins.c
make -C /usr/src/linux-headers-2.6.32-122-rtai SUBDIRS=`pwd` CC=gcc
V=0 -o /Module.symvers modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-122-rtai'
  CC [M]  /tmp/tmpiKZ9Db/genserkins.o
/tmp/tmpiKZ9Db/genserkins.c: In function ‘init_module’:
/tmp/tmpiKZ9Db/genserkins.c:642: error: ‘DEFAULT_THETA1’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:642: error: (Each undeclared identifier is
reported only once
/tmp/tmpiKZ9Db/genserkins.c:642: error: for each function it appears in.)
/tmp/tmpiKZ9Db/genserkins.c:643: error: ‘DEFAULT_THETA2’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:644: error: ‘DEFAULT_THETA3’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:645: error: ‘DEFAULT_THETA4’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:646: error: ‘DEFAULT_THETA5’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:647: error: ‘DEFAULT_THETA6’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:648: error: ‘DEFAULT_TYPE1’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:649: error: ‘DEFAULT_TYPE2’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:650: error: ‘DEFAULT_TYPE3’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:651: error: ‘DEFAULT_TYPE4’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:652: error: ‘DEFAULT_TYPE5’ undeclared
(first use in this function)
/tmp/tmpiKZ9Db/genserkins.c:653: error: ‘DEFAULT_TYPE6’ undeclared
(first use in this function)
make[2]: *** [/tmp/tmpiKZ9Db/genserkins.o] Error 1
make[1]: *** [_module_/tmp/tmpiKZ9Db] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-122-rtai'
make: *** [modules] Error 2
water...@waterjet:~/emc2-dev/src/emc/kinematics$


But I have them in genserkins.h file, just like A, Alpha and D values:

#define DEFAULT_A1 0
#define DEFAULT_ALPHA1 0
#define DEFAULT_D1 0
#define DEFAULT_THETA1 0
#define DEFAULT_TYPE1 1

#define DEFAULT_A2 0
#define DEFAULT_ALPHA2 -PI_2
#define DEFAULT_D2 0
#define DEFAULT_THETA2 0
#define DEFAULT_TYPE2 1

#define DEFAULT_A3 300
#define DEFAULT_ALPHA3 0
#define DEFAULT_D3 70
#define DEFAULT_THETA3 0
#define DEFAULT_TYPE3 1
etc...

How do I get comp take also genserkins.h file? I tried to "comp
--install" it too, but terminal said "urecognized filetype for mode
install: 'genserkins.h'

Viesturs

------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to