tum-autonomousdriving / autonomous-driving-simulator

44 stars 3 forks source link

[Test Simulator] Steering angle not working #23

Closed Aristotelis1 closed 1 year ago

Aristotelis1 commented 1 year ago

It seems that the steering value that is passed to the send_control is ignored. In my case, the car is always going straight.

System: Mac M1 Simulator: v0.22

phenschke commented 1 year ago

Same here on Windows v0.23.

ge49nuk commented 1 year ago

Same here on Windows v0.23.

same here

Sodamin commented 1 year ago

I just downloaded the newest version from gitlab (0.23) windows and it works (steering, breaking and throttle). Can you show what you are sending exactly and to which IP?

Does any of the 3 controls work?

TuNeXiZz commented 1 year ago

Well, the send_control function works if called in the vehicle_command function but not in the on_image function, where I use my model to predict the steering commands based on the images.

phenschke commented 1 year ago

Throttle works for me. Steering and brake always stay 0 no matter what value I provide. (e.g, send_control(0.5, 0.75, 0.1) in onimage makes the car drive with steering angle 0 and throttle 0.75 and brakes 0.)

Sodamin commented 1 year ago

Can you provide your code what you send to the simulation? Ferdinand and me built a very different code, but it does include brake as the third attribute

(The code provided in this repo does not include brake... @Einholz-Gao who is responsible for updating that one? )

image
Sodamin commented 1 year ago

I did some digging and it seems when the data is asnycronously sent back to the received images (so more or less data sent then images received) there seems to be a problem (also for me goes into full throttle no steering). Do you observe the same?

Sodamin commented 1 year ago

Ferdinand found a workaround, hope it also works for you: Send your steering controls everytime you get a new image. If your model or PC is not fast enough, take the last controls, but still send them. works for me in the newest version - after I had the same issue as you described

Einholz-Gao commented 1 year ago

The py code will be updated. We test it and the steering command is working now.

Einholz-Gao commented 1 year ago

But Attention: here the steering command should be -1 ~ 1, if you send 30 or 60, the car will not have any response.