Skip to content
Snippets Groups Projects
Commit ea5f1af2 authored by Stevedan Ogochukwu Omodolor's avatar Stevedan Ogochukwu Omodolor
Browse files

fixed bug in way

parent 3374d5a4
No related branches found
No related tags found
No related merge requests found
...@@ -324,7 +324,7 @@ int main(int argc, char **argv) { ...@@ -324,7 +324,7 @@ int main(int argc, char **argv) {
/* get latest yaw*/ /* get latest yaw*/
robot_state_t current_state_; robot_state_t current_state_;
current_state_ = uavs[robotid-1]->get_state(); current_state_ = uavs[robotid-1]->get_state();
float yaw = current_state_.p(2)*M_PI/180.0; // TODO confirm that indeed it is in degrees float yaw = current_state_.q(3)*M_PI/180.0; // TODO confirm that indeed it is in degrees
float vxl = vel_command_(0)*std::cos(yaw) + vel_command_(1)*std::sin(yaw) ; float vxl = vel_command_(0)*std::cos(yaw) + vel_command_(1)*std::sin(yaw) ;
float vyl = - vel_command_(0)*std::sin(yaw) + vel_command_(1)*std::cos(yaw) ; float vyl = - vel_command_(0)*std::sin(yaw) + vel_command_(1)*std::cos(yaw) ;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment