carla-simulator / ros-bridge

ROS bridge for CARLA Simulator
MIT License
523 stars 431 forks source link

correct position of walkers. #648

Open heweweh opened 1 year ago

heweweh commented 1 year ago

I'm trying to generate training data with carla-simulator, and fetch image/pointcloud/objects information via carla-ros-bridge. the problem is the message at /carla/ego_vehicle/objects or /carla/objects topic with [derived_object_msgs](https://docs.ros.org/en/kinetic/api/derived_object_msgs/html/index-msg.html)/Object type.

I found the object_sensor is publishing objects like following behaviors:

  1. if the object is a vehicle, then the Object.pose.position will be the position on the ground(x-y plane), but it will be adjust to pivot point when publishing Marker.
  2. if the object is a walker, then the Object.pose.position will be the pivot point of bounding box, and there is no adjustment before publishing Marker.

the reason, that I consider these behaviors are problematic, is the behaviors are not uniform, so I made this patch. the reason, that I choose to modify the walker.py, is that the position is intentionally adjusted when publishing Marker in vehicle.py, so I think maintainers are proposing to publish objects topic with position on the ground, but not the pivot point.

please help me to confirm this MR, thanks.


This change is Reviewable