New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ego vehicle not moving smoothly Carla 0.9.2 #20

Closed
anshulpaigwar opened this Issue Jan 2, 2019 · 3 comments

Comments

3 participants
@anshulpaigwar
Copy link
Contributor

anshulpaigwar commented Jan 2, 2019

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.

@fabianoboril

This comment has been minimized.

Copy link
Member

fabianoboril commented Jan 3, 2019

Hi,
there are a couple of things you describe here. Let me try explain the things:

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?

@fabianoboril

This comment has been minimized.

Copy link
Member

fabianoboril commented Jan 3, 2019

You may try if PR #22 improves the behavior.

@fabianoboril

This comment has been minimized.

Copy link
Member

fabianoboril commented Jan 7, 2019

The PR #22 is merged. I assume it fixes your problem, and we can close this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment