# Significance of rospy.time(0) in listener lookup transform function?

**URL:** <https://get-help.theconstruct.ai/t/significance-of-rospy-time-0-in-listener-lookup-transform-function/1896>\
**Category:** TF ROS 101\
**Created:** [January 7, 2020, 12:14am UTC](https://get-help.theconstruct.ai/t/significance-of-rospy-time-0-in-listener-lookup-transform-function/1896 "2020-01-07T00:14:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasank1958](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/vasank1958/32/10_2.png) [@vasank1958](https://get-help.theconstruct.ai/u/vasank1958)\
**Post date:** [January 7, 2020, 12:14am UTC](https://get-help.theconstruct.ai/t/significance-of-rospy-time-0-in-listener-lookup-transform-function/1896/1 "2020-01-07T00:14:01Z")

</div>

Why dont we use rospy.time.now() instead of rospy.time(0)

---

<div class="post-metadata">

**Author:** ![ralves](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/ralves/32/7039_2.png) [@ralves](https://get-help.theconstruct.ai/u/ralves)\
**Post date:** [January 7, 2020, 12:23am UTC](https://get-help.theconstruct.ai/t/significance-of-rospy-time-0-in-listener-lookup-transform-function/1896/2 "2020-01-07T00:23:37Z")

</div>

Hi @vasank1958,

according to [this link](https://answers.ros.org/question/243179/whats-the-diff-between-rospytime0-and-rospytimenow/?answer=243185#post-id-243185), the answer is:

> `rospy.Time.now()` just returns the current ‘wall clock time’ (or the simulated clock, depending on whether you have a [Clock server](http://wiki.ros.org/Clock) running).
> 
> `rospy.Time(0)` constructs a `Time` instance that has special significance in TF contexts: it will cause `lookupTransform(..)` and friends to return the _latest available data_ for a specific transform, instead of the data at a _specific point in time_ .

---

<div class="post-metadata">

**Author:** ![simon.steinmann91](https://get-help.theconstruct.ai/user_avatar/get-help.theconstruct.ai/simon.steinmann91/32/324_2.png) [@simon.steinmann91](https://get-help.theconstruct.ai/u/simon.steinmann91)\
**Post date:** [January 8, 2020, 1:21pm UTC](https://get-help.theconstruct.ai/t/significance-of-rospy-time-0-in-listener-lookup-transform-function/1896/3 "2020-01-08T13:21:32Z")

</div>

Hi @vasank1958  
When coding with Ros there are two different time systems. If you `import time` and` import rospy` you have the following options:

time.now() is the current computer system time. The ‘real time’  
rospy.Time.now() is the current ros clock time, which is usually given by the gazebo simulation.

Simulations often run faster or slower compared to the real time. Sometimes you need the one, sometimes the other.

perhaps give this a read. Using TF, you will often have to use rospy.Time.now() and rospy.duration()  
[http://wiki.ros.org/rospy/Overview/Time](http://wiki.ros.org/rospy/Overview/Time)
