Skip to content
Snippets Groups Projects
Commit 198b4c8e authored by Fabian Reister's avatar Fabian Reister
Browse files

ArmarXObjects: ensuring quaternion to be normalized

parent 979f6a0a
No related branches found
No related tags found
No related merge requests found
......@@ -83,7 +83,7 @@ void armarx::objects::to_json(simox::json::json& j, const SceneObject& rhs)
j["instanceName"] = rhs.instanceName;
j["collection"] = rhs.collection;
j["position"] = rhs.position;
j["orientation"] = rhs.orientation;
j["orientation"] = rhs.orientation.normalized();
if (rhs.isStatic.has_value())
{
j["isStatic"] = rhs.isStatic.value();
......@@ -106,6 +106,7 @@ void armarx::objects::from_json(const simox::json::json& j, SceneObject& rhs)
j.at("collection").get_to(rhs.collection);
j.at("position").get_to(rhs.position);
j.at("orientation").get_to(rhs.orientation);
rhs.orientation.normalize();
if (j.count("isStatic"))
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment