Robots/YouBot/lua_YouBotKinematics.cpp
// Center of mass with respect to the arm (not including the base)
Center of mass with respect to the arm (not including the base)
Center of mass with respect to the arm ( not including the base )
static int lua_com_arm(lua_State *L) {
	std::vector<double> q = lua_checkvector(L, 1);
	std::vector<double> comObject = lua_checkvector(L, 2);
	double mObject = luaL_checknumber(L, 3);
	std::vector<double> com = YouBot_kinematics_com_arm(&q[0],comObject,mObject);
	double mAugmented = mObject + mArm;
	com[0] /= mAugmented;
	com[1] /= mAugmented;
	com[2] /= mAugmented;
	lua_pushvector(L, com);
	return 1;
}
static int lua_com_arm ( lua_State * L ) { std :: vector < double > q = lua_checkvector ( L , 1 ) ; std :: vector < double > comObject = lua_checkvector ( L , 2 ) ; double mObject = luaL_checknumber ( L , 3 ) ; std :: vector < double > com = YouBot_kinematics_com_arm ( & q [ 0 ] , comObject , mObject ) ; double mAugmented = mObject + mArm ; com [ 0 ] /= mAugmented ; com [ 1 ] /= mAugmented ; com [ 2 ] /= mAugmented ; lua_pushvector ( L , com ) ; return 1 ; }
Center of mass with respect to the arm (not including the base)
Center of mass with respect to the arm ( not including the base )