####################################
##FILL ME IN
####################################
## for a custom note with links:
## note = This tutorial assumes you have completed the tf and time [[ja/tf/Tutorials/tf and Time (Python)|(Python)]] [[ja/tf/Tutorials/tf and Time (C++)|(C++)]] tutorials
## for the canned note of "This tutorial assumes that you have completed the previous tutorials:" just add the links
## note.0=
## descriptive title for the tutorial
## title = tfで時間移動 (Python)
## multi-line description to be displayed in search
## description = このチュートリアルでは、tfにおける発展的な時間移動について学びます
## the next tutorial description (optional)
## next =
## links to next tutorial (optional)
## next.0.link=
## next.1.link=
## what level user is this tutorial for
## level= AdvancedCategory
## keywords =
####################################
<<IncludeCSTemplate(TutorialCSHeaderTemplate)>>

<<TableOfContents(4)>>

[[tf/Tutorials/tf and Time (Python)|前回のチュートリアル]]では、tfに置ける基本的な時間の概念について学びました。このチュートリアルでは、更にそれを発展させ、強力なtfの能力をお見せしましょう。

== 時間移動 ==
[[ja/tf/Tutorials/tf and Time (Python)|前回のチュートリアル]]の中で終わったところから始めましょう。まず、いつもどおりパッケージの中に移ります。

{{{
  $ roscd learning_tf
}}}
ここで、1匹目の亀が'''今'''いるところを2匹目に追わせる代わりに、'''5秒前に'''いたところを追うようにしてみましょう。'''`nodes/turtle_tf_listener.py`'''を編集してください:

{{{#!python
        try:
            now = rospy.Time.now() - rospy.Duration(5.0)
            listener.waitForTransform("/turtle2", "/turtle1", now, rospy.Duration(1.0))
            (trans, rot) = listener.lookupTransform("/turtle2", "/turtle1", now)
        except (tf.Exception, tf.LookupException, tf.ConnectivityException):
}}}
<<Include(ja/tf/Tutorials/Time travel with tf (C++),,from="##explainstart",to="##explainend")>>

{{{#!python
        try:
            now = rospy.Time.now()
            past = now - rospy.Duration(5.0)
            listener.waitForTransformFull("/turtle2", now,
                                          "/turtle1", past,
                                          "/world", rospy.Duration(1.0))
            (trans, rot) = listener.lookupTransformFull("/turtle2", now,
                                                      "/turtle1", past,
                                                      "/world")
}}}
<<Include(ja/tf/Tutorials/Time travel with tf (C++),,from="##advancestart",to="##advancedend")>>

{{{
  $ roslaunch learning_tf start_demo.launch
}}}
これで、確かに、2匹目の亀は5秒前に1匹目がいた場所を追従するようになりました!

## AUTOGENERATED DO NOT DELETE
## TutorialCategory
## TutorialTurtlesim
## PythonCategory
## LearningCategory