carla-simulator / ros-bridge

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

The frequency of the ros topic about the vehicle status sent by carla is too low #732

Open cq1528 opened 4 months ago

cq1528 commented 4 months ago

In the launch file of carla_ros_bridge, I set the fixed_delta_seconds to 0.05. However, after actually starting carla and carla_ros_bridge, I found that the vehicle status topic /carla/ego_vehicle/vehicle_status is only 3hz, which is much lower than the 20hz I set in the launch file. What is the reason for this? 2024-05-30 17-21-55屏幕截图 2024-05-30 17-22-31屏幕截图

zhangye1111 commented 3 weeks ago

我在carla_ros_bridge的launch文件中,设置了fixed_delta_seconds为0.05,但是实际启动carla和carla_ros_bridge之后,发现车辆状态主题/carla/ego_vehicle/vehicle_status只有3hz,比我在launch文件中设置的20hz要低很多,这是什么原因造成的? 2024-05-30 17-21-55 屏幕截图 2024-05-30 17-22-31 屏幕截图

I have the same problem, do you know how to fix it?

oliver-schumann commented 3 weeks ago

I don't know how to do this in ros1 but in ros2 you should check the following:

ros2 topic hz with --use-sim-time

The frequency you want to verify is in the time of the simulator. However, ros2 topic hz uses per default the system time to calculate the frequency. Hence the values differ, because the simulator might run slower than the system time