Use of ClockMonitorState


#1

Hi,
I’m Marco and I need to monitor the time in a simulation through the state machine.
I thought I could use the ClockMonitorState function, but i really don’t know how to use it.
Could you please tell me an example ?

Thank you very much
Marco


#2

Hi Marco,

Probably the easiest way is to write your own state that does what you want.
You can access current simulation time with rospy.Time.now(), see the rospy documentation.

Cheers,
Jacques


#3

Thank you, It helped a lot!