Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions include/mujincontrollerclient/mujindefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ class MUJINCLIENT_API PickPlaceHistoryItem : public mujinjson::JsonSerializable
std::string containerName; ///< the name of the container where picking occurred for "picked", where placing occurred when "placed", and where touching occurred for "touched"
unsigned long long eventTimeStampUS = 0; ///< time that the event ocurred in us (from Linux epoch). For "picked" this is the chuck time, for "placed this is the unchuck time, for "touched" this is the time when the robot supposedly stopped touching/disturbing the object.
std::string object_uri; ///< the object uri
std::string referenceuri; ///< the object uri
Transform objectpose; ///< 7-values in world, unit is usually mm
AABB localaabb; ///< AABB of object in object frame.
unsigned long long sensorTimeStampUS = 0; ///< sensor timestamp in us (from Linux epoch) of when the object was detected in the scene
Expand Down
3 changes: 3 additions & 0 deletions src/mujindefinitions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ void PickPlaceHistoryItem::Reset()
containerName.clear();
eventTimeStampUS = 0;
object_uri.clear();
referenceuri.clear();
objectpose = Transform();
localaabb = AABB();
sensorTimeStampUS = 0;
Expand Down Expand Up @@ -54,6 +55,7 @@ void PickPlaceHistoryItem::LoadFromJson(const rapidjson::Value& rItem)
mujinjson::LoadJsonValueByKey(rItem, "containerName", containerName);
mujinjson::LoadJsonValueByKey(rItem, "eventTimeStampUS", eventTimeStampUS);
mujinjson::LoadJsonValueByKey(rItem, "object_uri", object_uri);
mujinjson::LoadJsonValueByKey(rItem, "referenceuri", referenceuri);

const rapidjson::Value::ConstMemberIterator itPose = rItem.FindMember("objectpose");
if( itPose != rItem.MemberEnd() ) {
Expand Down Expand Up @@ -86,6 +88,7 @@ void PickPlaceHistoryItem::SaveToJson(rapidjson::Value& rItem, rapidjson::Docume
mujinjson::SetJsonValueByKey(rItem, "containerName", containerName, alloc);
mujinjson::SetJsonValueByKey(rItem, "eventTimeStampUS", eventTimeStampUS, alloc);
mujinjson::SetJsonValueByKey(rItem, "object_uri", object_uri, alloc);
mujinjson::SetJsonValueByKey(rItem, "referenceuri", referenceuri, alloc);
std::array<Real,7> posearray;
posearray[0] = objectpose.quaternion[0];
posearray[1] = objectpose.quaternion[1];
Expand Down