dougsm / mvp_grasp

Multi-Viewpoint Picking (ICRA 2019)
BSD 3-Clause "New" or "Revised" License
205 stars 47 forks source link

problem with roslaunch mvp_grasping grasp_entropy_service.launch #4

Closed seivazi closed 4 years ago

seivazi commented 4 years ago

Hi, When I run roslaunch mvp_grasping grasp_entropy_service.launch I get following error. Any idea? Do i need to run any other commands before this? Or do I need to be connected to the robot for running the back-end:


  File "/catkin_ws/src/mvp_grasp/mvp_grasping/ros_nodes/grasp_entropy_node.py", line 13, in <module>
    import dougsm_helpers.tf_helpers as tfh
  File "/catkin_ws/src/mvp_grasp/dougsm_helpers/src/dougsm_helpers/tf_helpers.py", line 12, in <module>
    listener = tf2_ros.TransformListener(tfBuffer)
  File "/opt/ros/melodic/lib/python2.7/dist-packages/tf2_ros/transform_listener.py", line 54, in __init__
    self.last_update = rospy.Time.now()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/rostime.py", line 155, in now
    return get_rostime()
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/rostime.py", line 190, in get_rostime
    raise rospy.exceptions.ROSInitException("time is not initialized. Have you called init_node()?")
rospy.exceptions.ROSInitException: time is not initialized. Have you called init_node()?
Exception AttributeError: "TransformListener instance has no attribute 'tf_sub'" in <bound method TransformListener.__del__ of <tf2_ros.transform_listener.TransformListener instance at 0x7f404be0b870>> ignored
[grasp_entropy_node-1] process has died [pid 23736, exit code 1, cmd /catkin_ws/src/mvp_grasp/mvp_grasping/ros_nodes/grasp_entropy_node.py __name:=grasp_entropy_node __log:=```
dougsm commented 4 years ago

G'day @seivazi That's weird, looks like something has changed in tf that requires the init_node call first. I've pushed a small work around, see the above commit.