You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am attempting to follow along with the Using Time (Python) — ROS 2 Documentation tutorial. In the "1. Update the listener node" section, the tutorial instructs to edit turtle_tf2_listener.py and remove the timeout=Duration(seconds=1.0) parameter from the lookup_transform() call, and gives the following code:
However, upon inspecting the turtle_tf2_listener.py source file, I noticed that the now variable is not defined anywhere in the file. Because of this, I am unable to successfully follow along with the tutorial.
I wanted to ask if this is an error in the tutorial, or if the source file has been updated and the tutorial has not? How should I proceed in order to successfully complete the tutorial?
I am using ROS 2 Iron.
Thank you very much for your assistance.
The text was updated successfully, but these errors were encountered:
songyuc
changed the title
Issue: Undefined 'now' variable in 'turtle_tf2_listener.py' tutorial
Undefined 'now' variable in 'turtle_tf2_listener.py' tutorial
Oct 10, 2023
Hi @songyuc, your suspicions were correct 😉 - source file was updated, but tutorial has not. You can simply replace now with rclpy.time.Time(). See details here 🤖
I am attempting to follow along with the Using Time (Python) — ROS 2 Documentation tutorial. In the "1. Update the listener node" section, the tutorial instructs to edit
turtle_tf2_listener.py
and remove thetimeout=Duration(seconds=1.0)
parameter from thelookup_transform()
call, and gives the following code:However, upon inspecting the
turtle_tf2_listener.py
source file, I noticed that thenow
variable is not defined anywhere in the file. Because of this, I am unable to successfully follow along with the tutorial.I wanted to ask if this is an error in the tutorial, or if the source file has been updated and the tutorial has not? How should I proceed in order to successfully complete the tutorial?
I am using ROS 2 Iron.
Thank you very much for your assistance.
The text was updated successfully, but these errors were encountered: