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 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!
@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.
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!
I am working on the same thing..please let me know if you find any solution and I will do the same
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.
Thank you very much. Appreciate it!