17 #ifndef GZ_MSGS_CONVERT_JOINTTYPE_HH_
18 #define GZ_MSGS_CONVERT_JOINTTYPE_HH_
21 #include "gz/msgs/joint.pb.h"
28 inline namespace GZ_MSGS_VERSION_NAMESPACE {
33 msgs::Joint::Type result = msgs::Joint::REVOLUTE;
34 if (_str ==
"revolute")
36 result = msgs::Joint::REVOLUTE;
38 else if (_str ==
"revolute2")
40 result = msgs::Joint::REVOLUTE2;
42 else if (_str ==
"prismatic")
44 result = msgs::Joint::PRISMATIC;
46 else if (_str ==
"universal")
48 result = msgs::Joint::UNIVERSAL;
50 else if (_str ==
"ball")
52 result = msgs::Joint::BALL;
54 else if (_str ==
"screw")
56 result = msgs::Joint::SCREW;
58 else if (_str ==
"gearbox")
60 result = msgs::Joint::GEARBOX;
62 else if (_str ==
"fixed")
64 result = msgs::Joint::FIXED;
66 else if (_str ==
"continuous")
68 result = msgs::Joint::CONTINUOUS;
74 <<
"], returning msgs::Joint::REVOLUTE"
86 case msgs::Joint::REVOLUTE:
91 case msgs::Joint::REVOLUTE2:
96 case msgs::Joint::PRISMATIC:
101 case msgs::Joint::UNIVERSAL:
103 result =
"universal";
106 case msgs::Joint::BALL:
111 case msgs::Joint::SCREW:
116 case msgs::Joint::GEARBOX:
121 case msgs::Joint::FIXED:
126 case msgs::Joint::CONTINUOUS:
128 result =
"continuous";
136 <<
"], returning 'unknown'"