Ask Your Question

How to set use_sim_time

asked 2019-06-13 08:15:50 -0500

GabrielBagon44 gravatar image

Hi, I am wondering how you can set use_sim_time to true, or enable it for my nodes. Do I have to do it within my nodes? or in my launch file? Also, is this something you must do for all your nodes and/or launch files? Thanks.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2019-06-13 09:20:04 -0500

ChuiV gravatar image

If you need to set use_sim_time from the commandline, then rosparamis your friend. Please read

If you need to set it from a launch file, you can use either the <rosparam>tag to read a yaml file of parameters ( or you can use the <param> tag to set a particular parameter, like use_sim_time( For example, add <param name="/use_sim_time" value="true">

Reading the documentation helps alot.

Also helpful is the documentation regarding the ros clock:

You only need to set the /use_sim_time (note that it is in the root namespace) parameter once, and all your nodes will start using simulation time.

edit flag offensive delete link more


Thanks for the informative response!

GabrielBagon44 gravatar image GabrielBagon44  ( 2019-06-13 12:04:10 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2019-06-13 08:15:50 -0500

Seen: 6,436 times

Last updated: Jun 13 '19