Convert ctrl_cmd to pedal position

asked 2020-08-01 13:48:58 -0500

JoloGermanAg gravatar image

I am working on the interface for our drive-by-wire system.

For different reasons I would like to implement all of the conversion on the host computer that runs autoware. Output is ctrl_cmd but i would like to convert this ( linear_velocity, linear_acceleration #m/s^2, steering_angle) to numerical values that can correspond to pedal positions for brake and accelerator. What is the best way to implement this or is there some code that would be a good example? If I can't find anything I was thinking about using ros PID or ros-control but I am trying to be lazy and find some code that I can easily modify to fit my needs.

Thanks!

edit retag flag offensive close merge delete

Comments

1

@JoloGermanAg I do not know how to exactly do that but I think gazebo car demo has a plugin that do somethin similar. You can check it and see if that is what you want.

Weasfas gravatar image Weasfas  ( 2020-08-02 06:54:00 -0500 )edit

i looked at it but couldn't make much sense of it. I am now looking at dataspeed dbw Twist Controller to see if i can modify and make it work. Thank you!

JoloGermanAg gravatar image JoloGermanAg  ( 2020-08-03 13:21:15 -0500 )edit

I am working on the same thing..please let me know if you find any solution and I will do the same

sudip gravatar image sudip  ( 2020-09-28 18:29:33 -0500 )edit

Hi, i ended up slightly modifying a derivation of the dataspeed dbw node. Not the best solution but it worked to get output that can be outputted as percentage if you apply some simple math to it. I have not been able to test this on the vehicle yet and it may not be good but we'll see. I used: https://github.com/sanketgujar/CarND-... , downloaded this and running the dbw.launch only modification required was to set the flag for "activated" manually. I can get the code from the vehicle computer within the next two weeks.

JoloGermanAg gravatar image JoloGermanAg  ( 2020-09-28 22:54:21 -0500 )edit

Thank you very much. Appreciate it!

sudip gravatar image sudip  ( 2020-09-30 19:53:56 -0500 )edit