From d08350b6fb00e248ddd08b14e542485366c6a7ef Mon Sep 17 00:00:00 2001 From: Taiju Yamada Date: Tue, 30 Apr 2024 14:09:43 +0900 Subject: [PATCH] Set visible=true in header --- include/mujincontrollerclient/mujincontrollerclient.h | 2 +- src/mujincontrollerclient.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mujincontrollerclient/mujincontrollerclient.h b/include/mujincontrollerclient/mujincontrollerclient.h index 964c6446..fbdf6eb4 100644 --- a/include/mujincontrollerclient/mujincontrollerclient.h +++ b/include/mujincontrollerclient/mujincontrollerclient.h @@ -793,7 +793,7 @@ class MUJINCLIENT_API ObjectResource : public WebResource std::string geomtype; Real quaternion[4]; // quaternion [w, x, y, z] = [cos(angle/2), sin(angle/2)*rotation_axis] Real translate[3]; - bool visible; + bool visible = true; Real diffusecolor[4]; Real transparency; Real half_extents[3]; diff --git a/src/mujincontrollerclient.cpp b/src/mujincontrollerclient.cpp index 888d27b2..09eb3356 100644 --- a/src/mujincontrollerclient.cpp +++ b/src/mujincontrollerclient.cpp @@ -332,7 +332,7 @@ void ObjectResource::LinkResource::GetGeometries(std::vectorobjectpk, GetJsonValueByKey(*it, "pk"))); geometry->linkpk = linkpk; LoadJsonValueByKey(*it,"name",geometry->name,geometry->pk); - LoadJsonValueByKey(*it,"visible",geometry->visible,true); + LoadJsonValueByKey(*it,"visible",geometry->visible); LoadJsonValueByKey(*it,"geomtype",geometry->geomtype); LoadJsonValueByKey(*it,"transparency",geometry->transparency); LoadJsonValueByKey(*it,"quaternion",geometry->quaternion);