ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

What is better way to stop vehicle in Autoware?

asked 2020-04-14 00:30:39 -0500

tek raj gravatar image

updated 2020-04-14 08:53:41 -0500


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

edit retag flag offensive close merge delete


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 ?

JoloGermanAg gravatar image JoloGermanAg  ( 2020-04-14 18:37:05 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-04-14 23:54:59 -0500

tek raj gravatar image

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 :)

edit flag offensive delete link more


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

JoloGermanAg gravatar image JoloGermanAg  ( 2020-04-15 00:00:30 -0500 )edit

Thanks and looking forward to it!

tek raj gravatar image tek raj  ( 2020-04-15 00:03:14 -0500 )edit

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?

JoloGermanAg gravatar image JoloGermanAg  ( 2020-07-15 22:36:38 -0500 )edit

Hi, Thank you for getting back. No I haven't solved it yet. It would be really helpful if you could help on it.

tek raj gravatar image tek raj  ( 2020-07-16 01:49:01 -0500 )edit

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

JoloGermanAg gravatar image JoloGermanAg  ( 2020-07-16 11:40:09 -0500 )edit

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.

tek raj gravatar image tek raj  ( 2020-07-17 02:42:29 -0500 )edit

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!

JoloGermanAg gravatar image JoloGermanAg  ( 2020-07-17 15:14:44 -0500 )edit

@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

tek raj gravatar image tek raj  ( 2020-07-22 01:09:56 -0500 )edit

Question Tools

1 follower


Asked: 2020-04-14 00:30:39 -0500

Seen: 448 times

Last updated: Apr 14 '20