@@ -121,13 +121,13 @@ void VisualizationInterpreter::populate_visualization_env(Environment& env, LuaP
121121 marker.addPose (get<double >(args[0 ]),
122122 get<double >(args[1 ]),
123123 get<double >(args[2 ]),
124- get<double >(args[3 ]),
124+ get<double >(args[3 ]) * 2 * M_PI / 360.0 ,
125125 args[0 ].source .get () && settings.move_markers ,
126126 args[1 ].source .get () && settings.move_markers ,
127127 args[2 ].source .get () && settings.move_markers ,
128128 args[3 ].source .get () && settings.move_markers ,
129129 [x_source = args[0 ].source , y_source = args[1 ].source , z_source = args[2 ].source , psi_source = args[3 ].source ,
130- this , settings, tokens = parser.tokens , original_psi = get<double >(args[3 ])](const auto & feedback) mutable {
130+ this , settings, tokens = parser.tokens , original_psi = get<double >(args[3 ])*M_PI/ 180.0 ](const auto & feedback) mutable {
131131 if (feedback->event_type == visualization_msgs::InteractiveMarkerFeedback::BUTTON_CLICK && settings.click_for_dependency_trace ) {
132132 vector<LuaToken> tokens;
133133 signal.removeFormatting ();
@@ -167,7 +167,7 @@ void VisualizationInterpreter::populate_visualization_env(Environment& env, LuaP
167167 changes->changes .push_back (*change);
168168 }
169169 if (psi_source && feedback->control_name == " move_psi" ) {
170- if (const auto & change = psi_source->forceValue (fmod (yaw (feedback->pose .orientation ) + original_psi, 2 *M_PI)))
170+ if (const auto & change = psi_source->forceValue (fmod (yaw (feedback->pose .orientation ) + original_psi, 2 *M_PI) * 180.0 /M_PI ))
171171 changes->changes .push_back (*change);
172172 }
173173
@@ -287,7 +287,7 @@ void VisualizationInterpreter::populate_visualization_env(Environment& env, LuaP
287287 t[" x" ] = p ? p->position .x : 0 ;
288288 t[" y" ] = p ? p->position .y : 0 ;
289289 t[" z" ] = p ? p->position .z : 0 ;
290- t[" psi" ] = p ? yaw (p->orientation ) : 0 ;
290+ t[" psi" ] = p ? yaw (p->orientation ) * 180.0 /M_PI : 0 ;
291291
292292 return {result};
293293 }
@@ -569,7 +569,7 @@ void LiveScriptInterpreter::populate_live_env(lua::rt::Environment &env, const A
569569 return string {" Script execution cancelled!" };
570570
571571 if (args.size () == 4 && args[0 ].isnumber () && args[1 ].isnumber () && args[2 ].isnumber () && args[3 ].isnumber ()) {
572- quad.send_new_waypoint (geometry_msgs::pose (get<double >(args[0 ]), get<double >(args[1 ]), get<double >(args[2 ]), get<double >(args[3 ])));
572+ quad.send_new_waypoint (geometry_msgs::pose (get<double >(args[0 ]), get<double >(args[1 ]), get<double >(args[2 ]), get<double >(args[3 ])/ 360.0 * 2 * M_PI ));
573573
574574 return {};
575575 }
@@ -607,7 +607,7 @@ void LiveScriptInterpreter::populate_live_env(lua::rt::Environment &env, const A
607607 (*t)[" x" ] = p.position .x ;
608608 (*t)[" y" ] = p.position .y ;
609609 (*t)[" z" ] = p.position .x ;
610- (*t)[" psi" ] = yaw (p.orientation );
610+ (*t)[" psi" ] = yaw (p.orientation ) * 180.0 /M_PI ;
611611
612612 return {t};
613613 }
0 commit comments