Merge pull request #1082 from benelot/feature/link-names
Add link name to getJointInfo(...).
This commit is contained in:
@@ -2083,7 +2083,7 @@ static PyObject* pybullet_getJointInfo(PyObject* self, PyObject* args, PyObject*
|
|||||||
|
|
||||||
int bodyUniqueId = -1;
|
int bodyUniqueId = -1;
|
||||||
int jointIndex = -1;
|
int jointIndex = -1;
|
||||||
int jointInfoSize = 12; // size of struct b3JointInfo
|
int jointInfoSize = 13; // size of struct b3JointInfo
|
||||||
b3PhysicsClientHandle sm = 0;
|
b3PhysicsClientHandle sm = 0;
|
||||||
int physicsClientId = 0;
|
int physicsClientId = 0;
|
||||||
static char* kwlist[] = {"bodyUniqueId", "jointIndex", "physicsClientId", NULL};
|
static char* kwlist[] = {"bodyUniqueId", "jointIndex", "physicsClientId", NULL};
|
||||||
@@ -2135,6 +2135,8 @@ static PyObject* pybullet_getJointInfo(PyObject* self, PyObject* args, PyObject*
|
|||||||
PyFloat_FromDouble(info.m_jointMaxForce));
|
PyFloat_FromDouble(info.m_jointMaxForce));
|
||||||
PyTuple_SetItem(pyListJointInfo, 11,
|
PyTuple_SetItem(pyListJointInfo, 11,
|
||||||
PyFloat_FromDouble(info.m_jointMaxVelocity));
|
PyFloat_FromDouble(info.m_jointMaxVelocity));
|
||||||
|
PyTuple_SetItem(pyListJointInfo, 12,
|
||||||
|
PyString_FromString(info.m_linkName));
|
||||||
|
|
||||||
return pyListJointInfo;
|
return pyListJointInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user