andreasBihlmaier / gazebo2rviz

Automatically import all entities simulated in ROS-enabled Gazebo or described in a set of SDF files into rviz through the TF and Marker plugin. Furthermore add objects from a SDF as MoveIt collision objects.
http://wiki.ros.org/gazebo2rviz
66 stars 43 forks source link

Failed to find included model 'sun' #20

Open edmuthiah opened 4 years ago

edmuthiah commented 4 years ago

Screenshot from 2020-06-05 18-17-53 Hi I am trying to load the world file as described in this repo: https://github.com/Intelligent-Quads/iq_tutorials/blob/master/adding_a_sensor.md

I launch this world then I run the command ed-muthiah@ed-muthiah:~/catkin_ws/src/iq_sim/worlds$ roslaunch gazebo2rviz gazebo2rviz.launch worldfile:=${PWD}/runway.world

I also notice that even though i only call one particular world file it tries to parse another sdf which is the in the same gazebo but but is not in the world file Error parsing SDF file /home/ed-muthiah/ardupilot_gazebo/models/ZED_stereocamera/zed.sdf

If I delete this folder then it picks up another folder from the directory and says it cannot include.

The full error:

process[gazebo2tf-2]: started with pid [17367]
process[gazebo2marker-3]: started with pid [17373]
[INFO] [1591344575.859104, 0.000000]: Ignoring submodels of: ['']
[INFO] [1591344575.864137, 0.000000]: Spinning
[INFO] [1591344575.908635, 0.000000]: Ignoring submodels of: ['']
[ERROR] [1591344575.909849, 0.000000]: ignore_submodels_of is currently not supported and will thus have no effect
Error parsing SDF file /home/ed-muthiah/ardupilot_gazebo/models/ZED_stereocamera/zed.sdf (mismatched tag: line 80, column 6). Ignoring model and continuing.
Error parsing SDF file /home/ed-muthiah/ardupilot_gazebo/models/ZED_stereocamera/zed.sdf (mismatched tag: line 80, column 6). Ignoring model and continuing.
[INFO] [1591344576.209894, 624.232000]: Loaded model: ground_plane
[INFO] [1591344576.248302, 624.306000]: Loaded model: iris
[ERROR] [1591344576.260381, 624.322000]: bad callback: <function on_link_states_msg at 0x7f89a0d70850>
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/ed-muthiah/catkin_ws/src/gazebo2rviz/scripts/gazebo2tf_node.py", line 60, in on_link_states_msg
    if link.tree_parent_joint:
AttributeError: 'NoneType' object has no attribute 'tree_parent_joint'

Failed to find included model (URI: sun)
Failed to include model, see previous errors. Aborting.
^C[ERROR] [1591344576.279617, 624.345000]: bad callback: <function on_link_states_msg at 0x7f89a0d70850>
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/ed-muthiah/catkin_ws/src/gazebo2rviz/scripts/gazebo2tf_node.py", line 60, in on_link_states_msg
    if link.tree_parent_joint:
AttributeError: 'NoneType' object has no attribute 'tree_parent_joint'

[ERROR] [1591344576.323669, 624.424000]: bad callback: <function on_link_states_msg at 0x7f89a0d70850>
Traceback (most recent call last):
  File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/topics.py", line 750, in _invoke_callback
    cb(msg)
  File "/home/ed-muthiah/catkin_ws/src/gazebo2rviz/scripts/gazebo2tf_node.py", line 60, in on_link_states_msg
    if link.tree_parent_joint:
AttributeError: 'NoneType' object has no attribute 'tree_parent_joint'
andreasBihlmaier commented 4 years ago

Thank you for the issue description.

Due to the way gazebo2rviz is implemented, i.e. only using the information that is published by gazebo without adding a custom plugin, the model to load can only be identified by name. If there are multiple models with the same name (or inside and outside the world file), gazebo2rviz will take a best guess - it uses the first one found.

I'll have a look at the actual issue as soon as possible.

edmuthiah commented 4 years ago

Thanks for looking into this @andreasBihlmaier. To get to where I am should only take about 15 minutes:

  1. Set up a catkin workspace using catkin init
  2. Clone this repo and catkin build
  3. Install ArduPilot and MAVProxy
  4. Install the ArduPilot Gazebo Plugin

Try to run Gazbeo2Rviz!

im-renpei commented 3 years ago

Hi @ed-muthiah , is your problem solved?

ZZWang21 commented 1 year ago

same here. with the "tree_parent_joint" error. Have your problem solved? @ed-muthiah