Robotics StackExchange | Archived questions

How to set initial orientation for /odom and /base_footprint?

Hello,

Could someone help me with my issue. I have build my custom robot,however the initial orientation of my /odom frame is wrong. It is rotated for 180 degrees. Is it possible somehow to choose the initial x direction of the frame?

Thank you

Asked by Yehor on 2020-05-07 07:58:49 UTC

Comments

Standard ros cooridinate system is x = forward, y = left (seen from standing behing; port side), and angular-z is left turn, negative values are the opposite. Is your urdf oriented/build this way?

Asked by Dragonslayer on 2020-05-07 08:06:08 UTC

I don't have any urdf for know. I just launching my driver node, which posts odometry

Asked by Yehor on 2020-05-07 08:09:17 UTC

what are the data ur feeding to Odom examples like wheel Odom, imu, GPS and initial x-direction will start from 0

Asked by Nitesh_j on 2020-05-07 08:09:47 UTC

@Nitesh_j I feed wheel Odom, when the robot started it receives 0 from encoders.

I can't understand what do you mean with initial x-direction? The question is that the initial x-direction is rotated((

Asked by Yehor on 2020-05-07 08:16:09 UTC

How can 0 be "rotated"? If your robot/encoders moves forward does x increment or decrement? Maybe you could post a picture of some sort.

Asked by Dragonslayer on 2020-05-07 08:26:38 UTC

Sorry, the problem is related to my https://answers.ros.org/question/351704/transform-senderunknown_publisher-unknown-reason-for-transform-failure/ question.

I rotated lidar with static_transform_publisher, because it is mounted with opposite x direction. And now the x direction of odom is okay and the x direction of laser_frame is opposite to odom.

I it is difficult for me to understand it because I don't see laser msg with odom fixed frame.

Asked by Yehor on 2020-05-07 08:29:59 UTC

@ Dragonslayer I understand what is the problem, I rotated lidar frame with respect to base_footprint. However, I still can't check lidar msg with fixed frame base_footprint or odom

Asked by Yehor on 2020-05-07 08:37:02 UTC

Answers