Can someo0ne post Chapter 27 example code.
It would help me to understand the chapter and how this actually works.
Please Log in or Create an account to join the conversation.
Can you be a bit more specific?
Also note that the manuals are constantly being upgraded so if your looking at the installed manuals for 2.2.x the chapters might not be the same for 2.3.x. As always the most current manuals are on line. The HTML manuals are easily linked for questions and are broken up into individual subjects.
John
Please Log in or Create an account to join the conversation.
Ok this is what I was going to try next, guessing though. I was just working on getting the development packages to rebuild EMC2 with this new suport. Again I am only guessing this may work.
/********************************************************************
* Description: bipodkins.c
* Bipod kinematics
*
* Derived from a work by Fred Proctor & Will Shackleford
*
* Author:
* License: GPL Version 2
* System: Linux
*
* Copyright (c) 2004 All rights reserved.
*
* Last change:
********************************************************************/
#include "kinematics.h" /* these decls */
#include "posemath.h"
#include "hal.h"
#include "rtapi_math.h"
int kinematicsForward(const double *joint,
EmcPose *world, const KINEMATICS_FORWARD_FLAGS *fflags, KINEMATICS_INVERSE_FLAGS *iflags)
{
double AD2 = joints[0] * joints[0];
double BD2 = joints[1] * joints[1];
double x = (AD2 - BD2 + Bx * Bx) / (2 * Bx);
double y2 = AD2 - x * x;
if(y2 < 0) return -1;
pos->tran.x = x;
pos->tran.y = sqrt(y2);
return 0;
}
int kinematicsInverse(const EmcPose * world,
double *joints,
const KINEMATICS_INVERSE_FLAGS *iflags,
KINEMATICS_FORWARD_FLAGS *fflags)
{
double x2 = pos->tran.x * pos->tran.x;
double y2 = pos->tran.y * pos->tran.y;
joints[0] = sqrt(x2 + y2);
joints[1] = sqrt((Bx - pos->tran.x)*(Bx - pos->tran.x) + y2);
return 0;
}
/* implemented for these kinematics as giving joints preference */
int kinematicsHome(EmcPose * world,
double *joint,
KINEMATICS_FORWARD_FLAGS * fflags,
KINEMATICS_INVERSE_FLAGS * iflags)
{
*fflags = 0;
*iflags = 0;
return kinematicsForward(joint, world, fflags, iflags);
}
KINEMATICS_TYPE kinematicsType(void)
{
return KINEMATICS_IDENTITY;
}
#ifdef RTAPI
#include "rtapi.h" /* RTAPI realtime OS API */
#include "rtapi_app.h" /* RTAPI realtime module decls */
#include "hal.h"
EXPORT_SYMBOL(kinematicsType);
EXPORT_SYMBOL(kinematicsForward);
EXPORT_SYMBOL(kinematicsInverse);
MODULE_LICENSE("GPL");
int comp_id;
int rtapi_app_main(void) {
comp_id = hal_init("bipodkins");
if(comp_id > 0) {
hal_ready(comp_id);
return 0;
}
return comp_id;
}
void rtapi_app_exit(void) { hal_exit(comp_id); }
#endif
Please Log in or Create an account to join the conversation.
checking for glib... configure: error: no -- required until somebody makes modbus optional
Please Log in or Create an account to join the conversation.
www.linuxcnc.org/component/option,com_mo...rc/Itemid,8/lang,en/
John
Please Log in or Create an account to join the conversation.
Ok now it wants modbus but I can't seem to find the file it wants?
checking for glib... configure: error: no -- required until somebody makes modbus optional
It doesn't want modbus, it wants glib
Regards,
Alex
Please Log in or Create an account to join the conversation.
Thanks i will be back! There are more walls.
Please Log in or Create an account to join the conversation.
- step4linux
- Offline
- Premium Member
-
- Posts: 159
- Thank you received: 0
It would be easier to help you, if you tell us what exactly are you doing.
Gerd
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- step4linux
- Offline
- Premium Member
-
- Posts: 159
- Thank you received: 0
Most important things are pretty much explained in the Integrator Manual.
You can find lots of examples of kinematics in the source code of EMC2.
I suggest, take one example, which is closest to what you want to do.
Rename it and install it without any other changes (using comp tool).
From here you can go forward to your own kinematics.
regards
Gerd
Please Log in or Create an account to join the conversation.