Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rviz dae file Collada: File came out empty. Something is wrong here. #1534

Closed
JamesNewton opened this issue Aug 16, 2020 · 18 comments
Closed

Comments

@JamesNewton
Copy link

Describe your issue here and explain how to reproduce it.

Your environment

  • OS Version: Ubuntu 16.04
  • ROS Distro: Kinetic
  • RViz, Qt, OGRE, OpenGl version as printed by rviz:
[ INFO] [1597549634.471718284]: rviz version 1.12.17
[ INFO] [1597549634.471928315]: compiled against Qt version 5.5.1
[ INFO] [1597549634.471963392]: compiled against OGRE version 1.9.0 (Ghadamon)
[ INFO] [1597549634.990012145]: Stereo is NOT SUPPORTED
[ INFO] [1597549634.990159050]: OpenGl version: 3 (GLSL 1.3).

Description

Here is the complete run

$ roslaunch urdf_tutorial display.launch model:=/home/jamesn/Documents/Dexter.urdf
... logging to xxxx
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use xacro instead
started roslaunch server http://192.168.0.134:39389/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_gui: True

NODES
  /
    joint_state_publisher (joint_state_publisher/joint_state_publisher)
    robot_state_publisher (robot_state_publisher/state_publisher)
    rviz (rviz/rviz)

ROS_MASTER_URI=http://localhost:11311

process[joint_state_publisher-1]: started with pid [2505]
process[robot_state_publisher-2]: started with pid [2506]
process[rviz-3]: started with pid [2507]
[WARN] [1597548587.898550]: The 'use_gui' parameter was specified, which is deprecated.  We'll attempt to find and run the GUI, but if this fails you should install the 'joint_state_publisher_gui' package instead and run that.  This backwards compatibility option will be removed in Noetic.
[ERROR] [1597548589.274097388]: Could not load resource [LowRes_DexterHDIKinematic_Link1_Bottom.dae]: Collada: File came out empty. Something is wrong here.
[ERROR] [1597548589.274555027]: Could not load model 'LowRes_DexterHDIKinematic_Link1_Bottom.dae' for link 'base_link': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource LowRes_DexterHDIKinematic_Link1_Bottom.dae in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[ERROR] [1597548589.274796288]: Could not load model 'LowRes_DexterHDIKinematic_Link1_Bottom.dae' for link 'base_link': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource LowRes_DexterHDIKinematic_Link1_Bottom.dae in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
================================================================================REQUIRED process [rviz-3] has died!
process has finished cleanly
log file: /home/jamesn/.ros/log/0aa1d05c-df47-11ea-a068-1c4bd6cf810c/rviz-3*.log
Initiating shutdown!
================================================================================
[rviz-3] killing on exit
[robot_state_publisher-2] killing on exit
[joint_state_publisher-1] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

I've attached the dae file and the urdf file
LowRes_DexterHDIKinematic_Link1_Bottom.dae.zip

Dexter.urdf.zip

@JamesNewton JamesNewton changed the title rviz dae file " rviz dae file Collada: File came out empty. Something is wrong here. Aug 16, 2020
@rhaschke
Copy link
Contributor

I cannot reproduce this issue in the Melodic release of rviz:
image
Do you mind updating? Alternatively, use git bisect to figure out which commit fixed the issue and I will backport it.

@JamesNewton
Copy link
Author

JamesNewton commented Aug 16, 2020

Please pardon the ROS newbie questions but:

  • I don't think I can update past Kinetic on Ubuntu 16.04, but maybe I can update only rviz? Is that going to work?
  • bisecting would be actual work, which I have enough of at the moment. I feel bad saying that but... If you tell me it should be ok to update only rviz, I'll update one release at a time and tell you where it starts working. Hopefully that will narrow it down.

EDIT: Oops. I'm thinking with a binary release mindset and you don't do that do you? It's build from source and source code releases... Ok, let me see if I can figure out how to build my current version from source and then I'll try checking out more recent versions and see if those will build without changing the ROS package.

I'm confused. Since I installed Kinetic binary and did not build from source, I have to install "overlays"?

Should I be using catkin
http://wiki.ros.org/catkin/Tutorials/workspace_overlaying

or rosbuild with catkin?
http://wiki.ros.org/catkin/Tutorials/using_rosbuild_with_catkin

@rhaschke
Copy link
Contributor

Yes, I'm talking about source builds. Just clone rviz into your private ROS overlay workspace and build. All packages in Kinetic and later build with catkin. Building the latest meloic-devel branch of rviz should work on Kinetic as well.

@JamesNewton
Copy link
Author

JamesNewton commented Aug 17, 2020

Followed the workspace overlaying tutorial.

source /opt/ros/kinetic/setup.bash
cd ~/overlay_ws/
catkin_make

Cloned rviz at current default (which is melodic-devel right? yeah, git status says On branch melodic-devel) and catkin-make says a lot, but ends up with this:

[ 16%] Building CXX object rviz/src/rviz/CMakeFiles/rviz.dir/frame_manager.cpp.o
[ 16%] Built target rviz_default_plugin_automoc
In file included from /home/jamesn/overlay_ws/src/rviz/src/rviz/frame_manager.cpp:30:0:
/home/jamesn/overlay_ws/src/rviz/src/rviz/frame_manager.h: In member function ‘const std::shared_ptr<tf2_ros::Buffer> rviz::FrameManager::getTF2BufferPtr()’:
/home/jamesn/overlay_ws/src/rviz/src/rviz/frame_manager.h:259:17: error: ‘class tf::TransformListener’ has no member named ‘getTF2BufferPtr’
     return tf_->getTF2BufferPtr();
                 ^
rviz/src/rviz/CMakeFiles/rviz.dir/build.make:302: recipe for target 'rviz/src/rviz/CMakeFiles/rviz.dir/frame_manager.cpp.o' failed
make[2]: *** [rviz/src/rviz/CMakeFiles/rviz.dir/frame_manager.cpp.o] Error 1
CMakeFiles/Makefile2:3318: recipe for target 'rviz/src/rviz/CMakeFiles/rviz.dir/all' failed
make[1]: *** [rviz/src/rviz/CMakeFiles/rviz.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j8 -l8" failed

Appears to be a known issue, with no resolution.
#1241

P.S. Note to self, remember to source ~/overlay_ws/devel/setup.bash before running the newly built overlay program.

@JamesNewton
Copy link
Author

JamesNewton commented Aug 17, 2020

Did some binary search on what tag versions will build under Kinetic on Ubuntu 16.04 while working on another machine. Machine cycles are cheap right?

Was NOT able to build 1.13.4. Was able to build 1.12.17, but it still reports the exact same problem loading the .dae file. 1.13.2 fails to build. 1.13.0 does build, but still has the problem. 1.13.1 will not build.

So the latest version you can build with Kinetic is 1.13.0 and it still has the reported issue with the file. 1.13.1 and up, can not be built on Kinetic.

Any suggestions?

@rhaschke
Copy link
Contributor

Sorry, I forgot about the tf2 migration issue. You also need to clone a recent tf2 version into your catkin workspace and build it together with rviz:
git clone --branch=melodic-devel https://github.com/ros/geometry2

@JamesNewton
Copy link
Author

JamesNewton commented Aug 18, 2020

CMake Error at geometry2/tf2_bullet/CMakeLists.txt:11 (find_package):
  By not providing "Findbullet.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "bullet", but
  CMake did not find one.

As per:
https://www.programmersought.com/article/7841263710/
sudo apt-get install libbullet-dev
Got further, I see messages like:
[ 27%] Built target tf2
and
[ 30%] Built target tf2_ros

But then it still fails at:

[ 33%] Building CXX object rviz/src/rviz/CMakeFiles/rviz.dir/frame_manager.cpp.o
In file included from /home/jamesn/overlay_ws/src/rviz/src/rviz/frame_manager.cpp:30:0:
/home/jamesn/overlay_ws/src/rviz/src/rviz/frame_manager.h: In member function ‘const std::shared_ptr<tf2_ros::Buffer> rviz::FrameManager::getTF2BufferPtr()’:
/home/jamesn/overlay_ws/src/rviz/src/rviz/frame_manager.h:259:17: error: ‘class tf::TransformListener’ has no member named ‘getTF2BufferPtr’
     return tf_->getTF2BufferPtr();
                 ^
rviz/src/rviz/CMakeFiles/rviz.dir/build.make:302: recipe for target 'rviz/src/rviz/CMakeFiles/rviz.dir/frame_manager.cpp.o' failed
make[2]: *** [rviz/src/rviz/CMakeFiles/rviz.dir/frame_manager.cpp.o] Error 1
CMakeFiles/Makefile2:8472: recipe for target 'rviz/src/rviz/CMakeFiles/rviz.dir/all' failed
make[1]: *** [rviz/src/rviz/CMakeFiles/rviz.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

I do have the latest files checked out in src/rviz and in src/geometry2. They each report:
On branch melodic-devel Your branch is up-to-date with 'origin/melodic-devel'. nothing to commit, working directory clean

Ran it again, just to be sure. Even restarted the machine. No joy.

@rhaschke
Copy link
Contributor

Hm. This is strange. Looks like the headers are found in /opt/ros first... Need to investigate myself...
Note, you can easily install all upstream dependencies for your src folder via:
rosdep install --from-paths src --ignore-src --rosdistro $ROS_DISTRO

@rhaschke
Copy link
Contributor

Sorry, my fault: I was referring you to the wrong TF version. You need to clone TF1 into your catkin workspace:
git clone --branch=melodic-devel https://github.com/ros/geometry

@JamesNewton
Copy link
Author

JamesNewton commented Aug 19, 2020

Removed geometry2 and cloned geometry as indicated.

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 6 packages in topological order:
-- ~~  - geometry (metapackage)
WARNING: The CMakeLists.txt of the metapackage 'geometry' contains non standard content. Use the content of the following file instead: /home/jamesn/overlay_ws/build/catkin_generated/metapackages/geometry/CMakeLists.txt
-- ~~  - eigen_conversions
-- ~~  - kdl_conversions
-- ~~  - tf
-- ~~  - tf_conversions
-- ~~  - rviz
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkin_workspace.cmake:95 (message):
  This workspace contains non-catkin packages in it, and catkin cannot build
  a non-homogeneous workspace without isolation.  Try the
  'catkin_make_isolated' command instead.
Call Stack (most recent call first):
  CMakeLists.txt:67 (catkin_workspace)

I'm not sure how to "Use the content of the following file instead: /home/jamesn/overlay_ws/build/catkin_generated/metapackages/geometry/CMakeLists.txt"

Tried "catkin_make_isolated". The good news is that seems to have compiled. The bad news is for some strange reason, when I run it, I get 1.13.0 not 1.14.7. And I DID set the correct source and the path is to the overlay. I'm really confused:

~/Documents$ rviz --help
[ INFO] [1597865961.929938118]: rviz version 1.13.0
[ INFO] [1597865961.930022028]: compiled against Qt version 5.5.1
[ INFO] [1597865961.930054799]: compiled against OGRE version 1.9.0 (Ghadamon)
rviz command line options:
  -h [ --help ]               Produce this help message
  -s [ --splash-screen ] arg  A custom splash-screen image to display
  --help-file arg             A custom html file to show as the help screen
  -d [ --display-config ] arg A display config file (.rviz) to load
  -f [ --fixed-frame ] arg    Set the fixed frame
  -l [ --ogre-log ]           Enable the Ogre.log file (output in cwd) and 
                              console output.
  --in-mc-wrapper             Signal that this is running inside a 
                              master-chooser wrapper
  --opengl arg                Force OpenGL version (use '--opengl 210' for 
                              OpenGL 2.1 compatibility mode)
  --disable-anti-aliasing     Prevent rviz from trying to use anti-aliasing 
                              when rendering.
  --no-stereo                 Disable the use of stereo rendering.
  -v [ --verbose ]            Enable debug visualizations
  --log-level-debug           Sets the ROS logger level to debug.
~/Documents$ roscd rviz
:~/overlay_ws/src/rviz$ git status
On branch melodic-devel
Your branch is up-to-date with 'origin/melodic-devel'.
nothing to commit, working directory clean

@rhaschke
Copy link
Contributor

Does catkin provide details on which package is non-catkin? I'm usually building using catkin tools.

@JamesNewton
Copy link
Author

JamesNewton commented Aug 19, 2020

Yeah, it says in the output I posted above: "The CMakeLists.txt of the metapackage 'geometry' contains non standard content." Anyway, individual build might have fixed that, but I'm not sure what's going on with the version. See above. I've re-checked and I absolutely did do the correct source commands.
source /opt/ros/kinetic/setup.bash
before the catkin_make_isolated and then
source ~/overlay_ws/devel/setup.bash
before running the program.

@rhaschke
Copy link
Contributor

What's the content of your ROS_PACKAGE_PATH? Is your local rviz devel folder listed before /opt/ros?
If not, rebuild from scratch. Something went wrong..

@JamesNewton
Copy link
Author

JamesNewton commented Aug 20, 2020

Ah... I should have source ~/overlay_ws/devel_isolated/setup.bash. And then I got confused for a while because 1.13.13 is the melodic top, and the 1.14 must be neodic.

Anyway, it built and ran! Woo hooo!!!!

[ INFO] [1597898479.264840234]: rviz version 1.13.13
[ INFO] [1597898479.264909204]: compiled against Qt version 5.5.1
[ INFO] [1597898479.264934938]: compiled against OGRE version 1.9.0 (Ghadamon)

And I have /exactly/ the same error with 1.13.13:

 roslaunch urdf_tutorial display.launch model:=/home/jamesn/Documents/Dexter.urdf
... logging to /home/jamesn/.ros/log/f8d14f3c-e29e-11ea-a138-1c4bd6cf810c/roslaunch-jamesn-G73Sw2-11307.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

xacro: Traditional processing is deprecated. Switch to --inorder processing!
To check for compatibility of your document, use option --check-order.
For more infos, see http://wiki.ros.org/xacro#Processing_Order
xacro.py is deprecated; please use xacro instead
started roslaunch server http://jamesn-G73Sw2:42801/

SUMMARY
========

PARAMETERS
 * /robot_description: <?xml version="1....
 * /rosdistro: kinetic
 * /rosversion: 1.12.14
 * /use_gui: True

NODES
  /
    joint_state_publisher (joint_state_publisher/joint_state_publisher)
    robot_state_publisher (robot_state_publisher/state_publisher)
    rviz (rviz/rviz)

auto-starting new master
process[master]: started with pid [11323]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to f8d14f3c-e29e-11ea-a138-1c4bd6cf810c
process[rosout-1]: started with pid [11336]
started core service [/rosout]
process[joint_state_publisher-2]: started with pid [11343]
process[robot_state_publisher-3]: started with pid [11354]
process[rviz-4]: started with pid [11356]
[WARN] [1597898301.933789]: The 'use_gui' parameter was specified, which is deprecated.  We'll attempt to find and run the GUI, but if this fails you should install the 'joint_state_publisher_gui' package instead and run that.  This backwards compatibility option will be removed in Noetic.
[ERROR] [1597898303.941354921]: Could not load resource [LowRes_DexterHDIKinematic_Link1_Bottom.dae]: Collada: File came out empty. Something is wrong here.
[ERROR] [1597898303.958299646]: Could not load model 'LowRes_DexterHDIKinematic_Link1_Bottom.dae' for link 'base_link': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource LowRes_DexterHDIKinematic_Link1_Bottom.dae in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)
[ERROR] [1597898303.958730460]: Could not load model 'LowRes_DexterHDIKinematic_Link1_Bottom.dae' for link 'base_link': OGRE EXCEPTION(6:FileNotFoundException): Cannot locate resource LowRes_DexterHDIKinematic_Link1_Bottom.dae in resource group Autodetect or any other group. in ResourceGroupManager::openResource at /build/ogre-1.9-mqY1wq/ogre-1.9-1.9.0+dfsg1/OgreMain/src/OgreResourceGroupManager.cpp (line 756)

@rhaschke
Copy link
Contributor

The error message Collada: File came out empty. Something is wrong here. is generated by assimp, which is used to parse those files. Looks like the issue is in libassimp. Try to update this one. Closing here as this seems to be an upstream issue.

@JamesNewton
Copy link
Author

So apparently this has been a known bug in assimp since 2017... and is still open? How are you getting that file to work on your computer if it's still a known issue? @rhaschke may I ask what version of the OS you are running, since the issue seems less related to ROS version and more related to OS / assimp.
assimp/assimp#1278

@JamesNewton
Copy link
Author

The entire issue here has been that the CAD files were not being found.

The urdf file was in the ~/Documents folder, with the CAD files, but despite the documentation indicating that the mesh file "must be a local file." this does not (apparently) mean local to the urdf file. As soon as I put it in a package path, the file was loaded and displayed.

The lack of a package: prefix is clear in the urdf file I attached to the original report.

The error messages do NOT indicate that the file is not found. They say "File came out empty." or "Cannot locate resource"

I would recommend better error messages.

@rhaschke
Copy link
Contributor

Again, that's an issue of upstream assimp. In my newer version (4.1 from stock Ubuntu 18.04), I get the following error:

[ERROR] ros.rviz: Could not load resource [LowRes_DexterHDIKinematic_Link1_Bottom.dae]: Unable to open file "LowRes_DexterHDIKinematic_Link1_Bottom.dae".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants