2015-07-23 01:06:05 +00:00
|
|
|
#ifndef PHYSICS_CLIENT_C_API_H
|
|
|
|
#define PHYSICS_CLIENT_C_API_H
|
|
|
|
|
|
|
|
#include "SharedMemoryBlock.h"
|
|
|
|
|
|
|
|
#define B3_DECLARE_HANDLE(name) typedef struct name##__ { int unused; } *name
|
|
|
|
|
|
|
|
B3_DECLARE_HANDLE(b3PhysicsClientHandle);
|
2015-07-31 06:22:44 +00:00
|
|
|
B3_DECLARE_HANDLE(b3PhysicsRobotHandle);
|
2015-07-23 01:06:05 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2015-07-31 06:22:44 +00:00
|
|
|
b3PhysicsClientHandle b3ConnectSharedMemory(int allowSharedMemoryInitialization);
|
2015-07-23 01:06:05 +00:00
|
|
|
|
|
|
|
void b3DisconnectSharedMemory(b3PhysicsClientHandle physClient);
|
|
|
|
|
|
|
|
int b3ProcessServerStatus(b3PhysicsClientHandle physClient, struct SharedMemoryStatus* status);
|
|
|
|
|
|
|
|
int b3CanSubmitCommand(b3PhysicsClientHandle physClient);
|
|
|
|
|
|
|
|
int b3SubmitClientCommand(b3PhysicsClientHandle physClient, struct SharedMemoryCommand* command);
|
|
|
|
|
|
|
|
int b3GetNumPoweredJoints(b3PhysicsClientHandle physClient);
|
|
|
|
|
2015-07-31 06:22:44 +00:00
|
|
|
void b3GetPoweredJointInfo(b3PhysicsClientHandle physClient, int linkIndex, struct PoweredJointInfo* info);
|
2015-07-23 01:06:05 +00:00
|
|
|
|
|
|
|
int b3InitPhysicsParamCommand(struct SharedMemoryCommand* command);
|
|
|
|
int b3PhysicsParamSetGravity(struct SharedMemoryCommand* command, double gravx,double gravy, double gravz);
|
2015-07-31 06:22:44 +00:00
|
|
|
int b3PhysicsParamSetTimeStep(struct SharedMemoryCommand* command, double timeStep);
|
|
|
|
|
|
|
|
int b3InitStepSimulationCommand(struct SharedMemoryCommand* command);
|
|
|
|
|
|
|
|
int b3LoadUrdfCommandInit(struct SharedMemoryCommand* command, const char* urdfFileName);
|
|
|
|
///all those commands are optional, except for the *Init
|
|
|
|
int b3LoadUrdfCommandSetStartPosition(struct SharedMemoryCommand* command, double startPosX,double startPosY,double startPosZ);
|
|
|
|
int b3LoadUrdfCommandSetStartOrientation(struct SharedMemoryCommand* command, double startOrnX,double startOrnY,double startOrnZ, double startOrnW);
|
|
|
|
int b3LoadUrdfCommandSetUseMultiBody(struct SharedMemoryCommand* command, int useMultiBody);
|
|
|
|
int b3LoadUrdfCommandSetUseFixedBase(struct SharedMemoryCommand* command, int useFixedBase);
|
|
|
|
|
2015-07-23 01:06:05 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif //PHYSICS_CLIENT_C_API_H
|