ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

how does autoware's yaw change?

asked 2020-08-14 08:48:15 -0500

fantasyplus gravatar image

when head to north,yaw=0? And then the car turn to east,yaw increases to 359.99999 when touch north again?

edit retag flag offensive close merge delete

Comments

I'm sorry but you will need to provide more information. For example:

  • Operating System
  • Version of ROS
  • Version of Autoware
  • Which frame are you seeing these measurements in?
Josh Whitley gravatar image Josh Whitley  ( 2020-08-17 15:31:36 -0500 )edit
  • Operating System:Ubuntu 18.04
  • Version of ROS:melodic
  • Version of Autoware:autoware 1.14

I echo the topic "current_pose" which has the angle information,the frame is "map".

And I want to know does autoware's demo's yaw change like I said because I need to suit to my real car.

fantasyplus gravatar image fantasyplus  ( 2020-08-17 19:58:50 -0500 )edit

1 Answer

Sort by » oldest newest most voted
1

answered 2020-08-21 17:30:30 -0500

dtyugin gravatar image

Heading may depend on localization type you are using. If we talk about lidar localization then it depends on how map was built. If it was not aligned with GPS during building then zero heading depends on map (basically where your car was directed to during map collecting/building is a zero heading). /current_pose topic is a geometry_msgs::PoseStamped topic, so it store angles in quaternion, you have to convert it to degrees manually. If you are using ros it will gives you -180....180.

double yawDeg(const geometry_msgs::Quaternion &quat){
    tf::Quaternion q(
                quat.x,
                quat.y,
                quat.z,
                quat.w);
    tf::Matrix3x3 m(q);
    double roll, pitch, yaw;
    m.getRPY(roll, pitch, yaw);
    return yaw/M_PI*180.;
}
double yawDegree = yawDeg(msg->pose.orientation);

You can transform angles as you wish (0...360 or -180...180), stackoverflow has some answers. What type of localizer are you using?

edit flag offensive delete link more

Comments

Thanks anyway! . I have already let my car move yet.

fantasyplus gravatar image fantasyplus  ( 2020-08-24 21:46:43 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-08-14 08:48:15 -0500

Seen: 242 times

Last updated: Aug 14 '20