#include <rccl.h>
#include "manex.260.h"

#ifdef VXWORKS_CFG
#define main simple_260_
#endif

main()
{
        TRSF_PTR p, t;
        POS_PTR pos;
        MANIP *mnp;
        JNTS rcclpark;
        char *robotName;

        rcclSetOptions (RCCL_ERROR_EXIT);
        robotName = getDefaultRobot();
        if (!getRobotPosition (rcclpark.v, "rcclpark", robotName))
         { printf ("position 'rcclpark' not defined for robot\n");
           exit(-1);
         }

        t = allocTransXyz ("T", UNDEF, -200.0, 0.0, 50.0);
        p = allocTransRot ("P", UNDEF, P_X, P_Y, P_Z, xunit, 180.0);
        pos = makePosition ("pos", T6, EQ, p, t, NULL);

        mnp = rcclCreate (robotName, 0);
        rcclStart();

        movej (mnp, &rcclpark);

        setMod (mnp, 'c');
        move (mnp, pos);
        stop (mnp, 1000.0);

        movej (mnp, &rcclpark);
        stop (mnp, 1000.0);

        waitForCompleted (mnp);
        rcclRelease (YES);
}
