Create project file for BussIK inverse kinematics library (premake, cmake)
URDF/SDF: add a flag to force concave mesh collisiofor static objects. <collision concave="yes" name="pod_collision"> VR: support teleporting using buttong, allow multiple controllers to be used, fast wireframe rendering, Turn off warnings about deprecated C routine in btScalar.h/b3Scalar.h Add a dummy return to stop a warning Expose defaultContactERP in shared memory api/pybullet. First start to expose IK in shared memory api/pybullet (not working yet)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
#include "KukaGraspExample.h"
|
||||
#include "IKTrajectoryHelper.h"
|
||||
#include "../SharedMemory/IKTrajectoryHelper.h"
|
||||
|
||||
#include "../CommonInterfaces/CommonGraphicsAppInterface.h"
|
||||
#include "Bullet3Common/b3Quaternion.h"
|
||||
@@ -138,8 +138,11 @@ public:
|
||||
}
|
||||
virtual void stepSimulation(float deltaTime)
|
||||
{
|
||||
m_time+=deltaTime;
|
||||
m_targetPos.setValue(0.5, 0, 0.5+0.4*b3Sin(3 * m_time));
|
||||
float dt = deltaTime;
|
||||
btClamp(dt,0.0001f,0.01f);
|
||||
|
||||
m_time+=dt;
|
||||
m_targetPos.setValue(0.4-0.4*b3Cos( m_time), 0, 0.8+0.4*b3Cos( m_time));
|
||||
|
||||
|
||||
|
||||
@@ -158,11 +161,36 @@ public:
|
||||
q_current[i] = jointStates.m_actualStateQ[i+7];
|
||||
}
|
||||
}
|
||||
b3Vector3DoubleData dataOut;
|
||||
m_targetPos.serializeDouble(dataOut);
|
||||
|
||||
|
||||
// m_robotSim.getJointInfo(m_kukaIndex,jointIndex,jointInfo);
|
||||
/*
|
||||
b3RobotSimInverseKinematicArgs ikargs;
|
||||
b3RobotSimInverseKinematicsResults ikresults;
|
||||
|
||||
|
||||
ikargs.m_bodyUniqueId = m_kukaIndex;
|
||||
ikargs.m_currentJointPositions = q_current;
|
||||
ikargs.m_numPositions = 7;
|
||||
ikargs.m_endEffectorTargetPosition[0] = dataOut.m_floats[0];
|
||||
ikargs.m_endEffectorTargetPosition[1] = dataOut.m_floats[1];
|
||||
ikargs.m_endEffectorTargetPosition[2] = dataOut.m_floats[2];
|
||||
|
||||
|
||||
ikargs.m_endEffectorTargetOrientation[0] = 0;
|
||||
ikargs.m_endEffectorTargetOrientation[1] = 0;
|
||||
ikargs.m_endEffectorTargetOrientation[2] = 0;
|
||||
ikargs.m_endEffectorTargetOrientation[3] = 1;
|
||||
|
||||
if (m_robotSim.calculateInverseKinematics(ikargs,ikresults))
|
||||
{
|
||||
}
|
||||
*/
|
||||
double q_new[7];
|
||||
int ikMethod=IK2_SDLS;
|
||||
b3Vector3DoubleData dataOut;
|
||||
m_targetPos.serializeDouble(dataOut);
|
||||
|
||||
m_ikHelper.computeIK(dataOut.m_floats,q_current, numJoints, q_new, ikMethod);
|
||||
printf("q_new = %f,%f,%f,%f,%f,%f,%f\n", q_new[0],q_new[1],q_new[2],
|
||||
q_new[3],q_new[4],q_new[5],q_new[6]);
|
||||
|
||||
Reference in New Issue
Block a user