From e0448c761391fa2e6e21dab6a0ea2971d7c162d9 Mon Sep 17 00:00:00 2001 From: Jasmine Hsu Date: Thu, 23 Jun 2016 14:00:44 -0700 Subject: [PATCH 1/4] fix loading urdf at default position (0,0,0) and adding b3 cmd to change orientation if args provided --- examples/pybullet/pybullet.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index 9235f3e5a..3cc230128 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -135,7 +135,7 @@ pybullet_loadURDF(PyObject* self, PyObject* args) const char* urdfFileName=""; float startPosX =0; float startPosY =0; - float startPosZ = 1; + float startPosZ = 0; float startOrnX = 0; float startOrnY = 0; float startOrnZ = 0; @@ -165,6 +165,7 @@ pybullet_loadURDF(PyObject* self, PyObject* args) return NULL; } { + printf("(%f, %f, %f) (%f, %f, %f, %f)\n", startPosX,startPosY,startPosZ,startOrnX, startOrnY,startOrnZ, startOrnW); b3SharedMemoryStatusHandle statusHandle; int statusType; @@ -172,6 +173,7 @@ pybullet_loadURDF(PyObject* self, PyObject* args) //setting the initial position, orientation and other arguments are optional b3LoadUrdfCommandSetStartPosition(command, startPosX,startPosY,startPosZ); + b3LoadUrdfCommandSetStartOrientation(command, startOrnX, startOrnY,startOrnZ, startOrnW ); statusHandle = b3SubmitClientCommandAndWaitStatus(sm, command); statusType = b3GetStatusType(statusHandle); if (statusType!=CMD_URDF_LOADING_COMPLETED) From a21889e225d8020577fc5c36dda89e9c7929b74e Mon Sep 17 00:00:00 2001 From: Jasmine Hsu Date: Thu, 23 Jun 2016 14:01:57 -0700 Subject: [PATCH 2/4] remove print debugger --- examples/pybullet/pybullet.so | 1 + 1 file changed, 1 insertion(+) create mode 120000 examples/pybullet/pybullet.so diff --git a/examples/pybullet/pybullet.so b/examples/pybullet/pybullet.so new file mode 120000 index 000000000..59de5c3df --- /dev/null +++ b/examples/pybullet/pybullet.so @@ -0,0 +1 @@ +libpybullet.dylib \ No newline at end of file From 976e228be0c3b035386168fe415188d53468ad3c Mon Sep 17 00:00:00 2001 From: Jasmine Hsu Date: Thu, 23 Jun 2016 14:05:36 -0700 Subject: [PATCH 3/4] remove print debugger --- examples/pybullet/pybullet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/pybullet/pybullet.c b/examples/pybullet/pybullet.c index 3cc230128..a8ad37b30 100644 --- a/examples/pybullet/pybullet.c +++ b/examples/pybullet/pybullet.c @@ -165,7 +165,7 @@ pybullet_loadURDF(PyObject* self, PyObject* args) return NULL; } { - printf("(%f, %f, %f) (%f, %f, %f, %f)\n", startPosX,startPosY,startPosZ,startOrnX, startOrnY,startOrnZ, startOrnW); + // printf("(%f, %f, %f) (%f, %f, %f, %f)\n", startPosX,startPosY,startPosZ,startOrnX, startOrnY,startOrnZ, startOrnW); b3SharedMemoryStatusHandle statusHandle; int statusType; From d2a27972015ec8915810d876afc8c072a697d350 Mon Sep 17 00:00:00 2001 From: Jasmine Hsu Date: Thu, 23 Jun 2016 14:06:14 -0700 Subject: [PATCH 4/4] accidently added pybullet.so --- examples/pybullet/pybullet.so | 1 - 1 file changed, 1 deletion(-) delete mode 120000 examples/pybullet/pybullet.so diff --git a/examples/pybullet/pybullet.so b/examples/pybullet/pybullet.so deleted file mode 120000 index 59de5c3df..000000000 --- a/examples/pybullet/pybullet.so +++ /dev/null @@ -1 +0,0 @@ -libpybullet.dylib \ No newline at end of file