Add pybullet API for logging contacts.

This commit is contained in:
yunfeibai
2017-04-02 16:03:20 -07:00
parent 0d83667817
commit 1e91e78469
3 changed files with 33 additions and 10 deletions

View File

@@ -47,7 +47,8 @@ p.setRealTimeSimulation(useRealTimeSimulation)
#use 0 for no-removal
trailDuration = 15
logId = p.startStateLogging(p.STATE_LOGGING_GENERIC_ROBOT,"LOG0001.txt",[0,1,2])
logId1 = p.startStateLogging(p.STATE_LOGGING_GENERIC_ROBOT,"LOG0001.txt",[0,1,2])
logId2 = p.startStateLogging(p.STATE_LOGGING_CONTACT_POINTS,"LOG0002.txt",bodyIndexA=1)
for i in xrange(5):
print "Body %d's name is %s." % (i, p.getBodyInfo(i)[1])