File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -237,21 +237,22 @@ impl Kinematics {
237237 let mut body_yaw_target = 0.0 ;
238238 // if body yaw is specified, rotate the platform accordingly
239239 if body_yaw. is_some ( ) {
240- body_yaw_target = body_yaw. unwrap ( ) ;
240+ body_yaw_target = - body_yaw. unwrap ( ) ;
241241 // first verify if the body yaw is within the allowed limits
242242 // relative yaw is the yaw difference between the current platform yaw and body yaw
243243 // it should stays within +/- max_relative_yaw
244244 if let Some ( max_rel_yaw) = max_relative_yaw {
245245 let current_yaw = t_world_platform[ ( 0 , 1 ) ] . atan2 ( t_world_platform[ ( 0 , 0 ) ] ) ;
246246 let relative_yaw = body_yaw_target - current_yaw;
247247 body_yaw_target = current_yaw + relative_yaw. clamp ( -max_rel_yaw, max_rel_yaw) ;
248- body_yaw_target = - body_yaw_target;
248+ body_yaw_target = body_yaw_target;
249249 }
250250 // then clamp the body yaw within +/- max_body_yaw
251251 // this is physically limited by the mechanical design
252252 if let Some ( max_body_yaw) = max_body_yaw {
253253 body_yaw_target = body_yaw_target. clamp ( -max_body_yaw, max_body_yaw) ;
254254 }
255+ body_yaw_target = -body_yaw_target;
255256 }
256257
257258 // construct the joint angles vector
You can’t perform that action at this time.
0 commit comments