@@ -51,6 +51,7 @@ void to_proto_impl<Orientation>::operator()(const Orientation& self,
5151 aa.set_z (a.z );
5252 aa.set_theta (a.theta );
5353 *orientation.mutable_axis_angles () = std::move (aa);
54+ orientation.set_has_axis_angles ();
5455 }
5556
5657 void operator ()(const orientation_vector& ov) {
@@ -60,6 +61,7 @@ void to_proto_impl<Orientation>::operator()(const Orientation& self,
6061 ovec.set_z (ov.z );
6162 ovec.set_theta (ov.theta );
6263 *orientation.mutable_vector_radians () = std::move (ovec);
64+ orientation.set_has_vector_radians ();
6365 }
6466
6567 void operator ()(const orientation_vector_degrees& ovd) {
@@ -69,6 +71,7 @@ void to_proto_impl<Orientation>::operator()(const Orientation& self,
6971 ovec.set_z (ovd.z );
7072 ovec.set_theta (ovd.theta );
7173 *orientation.mutable_vector_degrees () = std::move (ovec);
74+ orientation.set_has_vector_degrees ();
7275 }
7376
7477 void operator ()(const euler_angles& ea) {
@@ -77,6 +80,7 @@ void to_proto_impl<Orientation>::operator()(const Orientation& self,
7780 euler.set_roll (ea.roll );
7881 euler.set_yaw (ea.yaw );
7982 *orientation.mutable_euler_angles () = std::move (euler);
83+ orientation.set_has_euler_angles ();
8084 }
8185
8286 void operator ()(const quaternion& q) {
@@ -86,6 +90,7 @@ void to_proto_impl<Orientation>::operator()(const Orientation& self,
8690 quat.set_y (q.y );
8791 quat.set_z (q.z );
8892 *orientation.mutable_quaternion () = std::move (quat);
93+ orientation.set_has_quaternion ();
8994 }
9095
9196 app::v1::Orientation& orientation;
0 commit comments