summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerwincoumans <erwin.coumans@gmail.com>2018-06-12 17:00:16 -0700
committererwincoumans <erwin.coumans@gmail.com>2018-06-12 17:00:16 -0700
commit08d84d6ce31d5f89cfd31425d38aa77be759979f (patch)
tree6a9799cf179d792798aef9d782049e28d9ddeb0b
parent4d6741f5cd8c1c5f6511d38161480e5ddcc21744 (diff)
downloadbullet3-08d84d6ce31d5f89cfd31425d38aa77be759979f.tar.gz
fix getLinkState usage
-rw-r--r--examples/RoboticsLearning/GripperGraspExample.cpp5
-rw-r--r--examples/RoboticsLearning/KukaGraspExample.cpp4
2 files changed, 7 insertions, 2 deletions
diff --git a/examples/RoboticsLearning/GripperGraspExample.cpp b/examples/RoboticsLearning/GripperGraspExample.cpp
index 259ad229e..e907c9308 100644
--- a/examples/RoboticsLearning/GripperGraspExample.cpp
+++ b/examples/RoboticsLearning/GripperGraspExample.cpp
@@ -502,7 +502,10 @@ public:
}
// compute body position and orientation
b3LinkState linkState;
- m_robotSim.getLinkState(0, 6, &linkState);
+ bool computeVelocity=true;
+ bool computeForwardKinematics=true;
+ m_robotSim.getLinkState(0, 6, computeVelocity,computeForwardKinematics, &linkState);
+
m_worldPos.setValue(linkState.m_worldLinkFramePosition[0], linkState.m_worldLinkFramePosition[1], linkState.m_worldLinkFramePosition[2]);
m_worldOri.setValue(linkState.m_worldLinkFrameOrientation[0], linkState.m_worldLinkFrameOrientation[1], linkState.m_worldLinkFrameOrientation[2], linkState.m_worldLinkFrameOrientation[3]);
diff --git a/examples/RoboticsLearning/KukaGraspExample.cpp b/examples/RoboticsLearning/KukaGraspExample.cpp
index a0da21621..04e102077 100644
--- a/examples/RoboticsLearning/KukaGraspExample.cpp
+++ b/examples/RoboticsLearning/KukaGraspExample.cpp
@@ -151,7 +151,9 @@ public:
}
// compute body position and orientation
b3LinkState linkState;
- m_robotSim.getLinkState(0, 6, &linkState);
+ bool computeVelocity=true;
+ bool computeForwardKinematics=true;
+ m_robotSim.getLinkState(0, 6, computeVelocity,computeForwardKinematics, &linkState);
m_worldPos.setValue(linkState.m_worldLinkFramePosition[0], linkState.m_worldLinkFramePosition[1], linkState.m_worldLinkFramePosition[2]);
m_worldOri.setValue(linkState.m_worldLinkFrameOrientation[0], linkState.m_worldLinkFrameOrientation[1], linkState.m_worldLinkFrameOrientation[2], linkState.m_worldLinkFrameOrientation[3]);