Convert ctrl_cmd to pedal position
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 ctrlcmd but i would like to convert this ( linearvelocity, linearacceleration #m/s^2, steeringangle) 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!
Asked by JoloGermanAg on 2020-08-01 13:48:58 UTC
Comments
@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.
Asked by Weasfas on 2020-08-02 06:54:00 UTC
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!
Asked by JoloGermanAg on 2020-08-03 13:21:15 UTC
I am working on the same thing..please let me know if you find any solution and I will do the same
Asked by sudip on 2020-09-28 18:29:33 UTC
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-Capstone_project , 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.
Asked by JoloGermanAg on 2020-09-28 22:54:21 UTC
Thank you very much. Appreciate it!
Asked by sudip on 2020-09-30 19:53:56 UTC