migrating from b3RobotSimAPI to b3RobotSimulatorClientAPI (step by step)
allow to run the client/server code in the example browser without this b3RobotSimAPI hack.
This commit is contained in:
@@ -124,6 +124,17 @@ struct b3RobotSimulatorInverseKinematicsResults
|
||||
b3AlignedObjectArray<double> m_calculatedJointPositions;
|
||||
};
|
||||
|
||||
struct b3JointStates2
|
||||
{
|
||||
int m_bodyUniqueId;
|
||||
int m_numDegreeOfFreedomQ;
|
||||
int m_numDegreeOfFreedomU;
|
||||
b3Transform m_rootLocalInertialFrame;
|
||||
b3AlignedObjectArray<double> m_actualStateQ;
|
||||
b3AlignedObjectArray<double> m_actualStateQdot;
|
||||
b3AlignedObjectArray<double> m_jointReactionForces;
|
||||
};
|
||||
|
||||
///The b3RobotSimulatorClientAPI is pretty much the C++ version of pybullet
|
||||
///as documented in the pybullet Quickstart Guide
|
||||
///https://docs.google.com/document/d/10sXEhzFRSnvFcl3XxNGhnD4N2SedqwdAvK3dsihxVUA
|
||||
@@ -137,6 +148,11 @@ public:
|
||||
b3RobotSimulatorClientAPI();
|
||||
virtual ~b3RobotSimulatorClientAPI();
|
||||
|
||||
//setGuiHelper is only used when embedded in existing example browser
|
||||
void setGuiHelper(struct GUIHelperInterface* guiHelper);
|
||||
//renderScene is only used when embedded in existing example browser
|
||||
virtual void renderScene();
|
||||
|
||||
bool connect(int mode, const std::string& hostName = "localhost", int portOrKey = -1);
|
||||
|
||||
void disconnect();
|
||||
@@ -177,6 +193,8 @@ public:
|
||||
|
||||
bool getJointState(int bodyUniqueId, int jointIndex, struct b3JointSensorState* state);
|
||||
|
||||
bool getJointStates(int bodyUniqueId, b3JointStates2& state);
|
||||
|
||||
bool resetJointState(int bodyUniqueId, int jointIndex, double targetValue);
|
||||
|
||||
void setJointMotorControl(int bodyUniqueId, int jointIndex, const struct b3RobotSimulatorJointMotorArgs& args);
|
||||
|
||||
Reference in New Issue
Block a user