carla-simulator / ros-bridge

ROS bridge for CARLA Simulator
MIT License
532 stars 441 forks source link

Adjust ego vehicle position to align with wheelbase #746

Open danicannt opened 3 weeks ago

danicannt commented 3 weeks ago

Hello, I am trying to figure out how to adjust the spawn point of the car model so that the ego vehicle is aligned with the wheelbase rather than positioned in the middle of the model. Currently, the vehicle seems to spawn with its center point at the middle of the model. Ideally, I would like it to be positioned further back so that the origin aligns with the wheelbase.

Any guidance or suggestions on how to achieve this adjustment would be greatly appreciated. Thank you!

oliver-schumann commented 1 week ago

Hi,

I think in this case you must change the model of the vehicle that you want to spawn. The origin of the coordinate system is always lying in the center of the vehicle which is rather cumbersome.

However you can also transform the position, velocities and accelerations manually to the rear axis by doing rigid body transformations.

Good Luck Oli