Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Ego vehicle not moving smoothly Carla 0.9.2 #20
On running the script manual_control.py along with carla_ros_bridge the ego vehicle do not run smoothly there is a tremendous amount of lag when controlled from the keyboard.
Also in my script when I spawn a vehicle in autopilot mode and set its role name as "hero", the motion of ego vehicle is not smooth.
But when I do not set the role name of the vehicle everything works perfectly. I could not understand the problem. I tried changing the PID parameters but no improvement.
1.) If there is no vehicle with role-name "hero", the ros-bridge is only receiving information from CARLA, but not sending any commands to CARLA. Also, the amount of information may be reduced to a limited set of quantities. As a result, you have full control over the vehicle by the manual_control.py
2.) When you have a vehicle with name "hero", the ros-bridge sends control commands for this vehicle to CARLA. Usually, these commands should come from a ROS publisher (either via an ackermann msg or via throttle/brake control msgs). However, if this publisher is missing (which seems to be the case for you), it sends a permanent brake command. Now, in your case, you try to overwrite this command with you inputs of the manual_control.py client. Hence, you have now 2 CARLA client, that both send control commands to CARLA. This will inevitably cause trouble.
3.) When running the ros-bridge, keep in mind that it does require some CPU resources. On less powerful machines, this may cause some lag.
Can you work without the hero-flag for now?