What is better way to stop vehicle in Autoware?
Hi,
I am new to autoware and have gone through the doc but i am unable to locate the required information on how to stop the vehicle. It would be really great if anyone could help me how can I apply brake to stop vehicle.
Autoware version:1.9
Thank you
Asked by tek raj on 2020-04-14 00:30:39 UTC
Answers
We are not trying to migrate to the latest version. Yes, we're using GUI. But I need to to apply brake based on script. So any help would be appreciated :)
Asked by tek raj on 2020-04-14 23:54:59 UTC
Comments
I unfortunately don't have access to 1.9 version. In the never version it depends on how you are connecting/interfacing to your vehicle. example: autonomousstuff in gitlab for master version: drivers/as you can look at their files to get an understanding on how they communicate the values specified in the GUI to their receiver in the vehicle. Alternatively, you can write your own code to subscribe to the specific nodes that publish brake values/commands and output it to where you need it. We wrote some code ourselves to subscribe to that topic and output to usb which is connected to a custom pcb, i currently don't have access to that code but should be able to help within a week or two as it is still being worked on
Asked by JoloGermanAg on 2020-04-15 00:00:30 UTC
Thanks and looking forward to it!
Asked by tek raj on 2020-04-15 00:03:14 UTC
Hey, sorry for the delay. Covid shut down the lab facilites and everything we had. We are starting to work on everything again just now. Did you solve your issues?
Asked by JoloGermanAg on 2020-07-15 22:36:38 UTC
Hi, Thank you for getting back. No I haven't solved it yet. It would be really helpful if you could help on it.
Asked by tek raj on 2020-07-16 01:49:01 UTC
It is going to be a couple of days - in the meantime i looked at mpc_follower and pure_pursuit nodes. mpc_follower publishes twist command (velocity and angular velocity/steering) as follows:
ros::Publisher pub_twist_cmd_; //!< @brief topic publisher for twist command
/**
* @brief publish control command as geometry_msgs/TwistStamped type
* @param [in] vel_cmd velocity command [m/s] for vehicle control
* @param [in] omega_cmd angular velocity command [rad/s] for vehicle control
*/
void publishTwist(const double &vel_cmd, const double &omega_cmd);
no promises and I don't have enough experience/knowledge on this but you should be able to do a simple command in terminal to test if this is correct:
rostopic pub geometry_msgs/TwistStamped twist_cmd "your desired input"
If you are not using twist you could do the same with the following messages: autoware_msgs/BrakeCmd brake_cmd
Asked by JoloGermanAg on 2020-07-16 11:40:09 UTC
I have been using the similar approach in my custom script. I was able to make change in the speed and also stop the vehicle. However, the problem was I was not able to make it stop at the desired stopping point. Just wanted to know if you have something better.
Thank you.
Asked by tek raj on 2020-07-17 02:42:29 UTC
Ah I see! You will need to calculate stopping distance (which is depended on your vehicle speed and your brake application as well as some other parameters). One formula you can find on this link:Stopping Distance.
once you have the stopping distance calculated you can apply brake at the distance before the stop sign/line.
If you are using open_planner, it will do that for you but you may need to adjust some parameters.
Hope this helps!
Asked by JoloGermanAg on 2020-07-17 15:14:44 UTC
@jologermanag thanks for this suggestion. At the moment I am trying openplanner but it is not stopping before stopline. May be you have some suggestion on it https://answers.ros.org/question/356722/unable-to-stop-at-stop-line-vector-maps-using-open-planner/
Asked by tek raj on 2020-07-22 01:09:56 UTC
Comments
Are you using the GUI? How are you interfacing to the vehicle? Or are you talking simulation? Also just curious, why are you using 1.9 ?
Asked by JoloGermanAg on 2020-04-14 18:37:05 UTC