ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Cannot locate resource package://lexus_rx_450h_description/meshes/LexusRX.obj in resource group OgreAutodetect

asked 2020-06-09 13:58:48 -0500

kcassis gravatar image

updated 2020-06-10 01:13:24 -0500

gvdhoorn gravatar image

I have installed Autoware and ROS from the src code. I first source the libraries then run rviz with no problem however when I try to run the robot_state_publisher with the lexus file I get the below error:

Parsing robot urdf xml string.
[ERROR] [rviz2]: No meshes found in file [package://lexus_rx_450h_description/meshes/LexusRX.obj]
[ERROR] [rviz2]: FileNotFoundException: Cannot locate resource package://lexus_rx_450h_description/meshes/LexusRX.obj in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.6/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/OgreMain/src/OgreResourceGroupManager.cpp (line 708)
[ERROR] [rviz2]: could not load model 'package://lexus_rx_450h_description/meshes/LexusRX.obj' for link 'base_link': FileNotFoundException: Cannot locate resource package://lexus_rx_450h_description/meshes/LexusRX.obj in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.6/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/OgreMain/src/OgreResourceGroupManager.cpp (line 708)
[ERROR] [rviz2]: No meshes found in file [package://lexus_rx_450h_description/meshes/LexusRX.obj]
[ERROR] [rviz2]: FileNotFoundException: Cannot locate resource package://lexus_rx_450h_description/meshes/LexusRX.obj in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.6/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/OgreMain/src/OgreResourceGroupManager.cpp (line 708)
[ERROR] [rviz2]: could not load model 'package://lexus_rx_450h_description/meshes/LexusRX.obj' for link 'base_link': FileNotFoundException: Cannot locate resource package://lexus_rx_450h_description/meshes/LexusRX.obj in resource group OgreAutodetect. in ResourceGroupManager::openResource at /tmp/binarydeb/ros-dashing-rviz-ogre-vendor-6.1.6/obj-x86_64-linux-gnu/ogre-master-ca665a6-prefix/src/ogre-master-ca665a6/OgreMain/src/OgreResourceGroupManager.cpp (line 708)

My commands are:

$ source /opt/Autoware/share/setup.bash
$ rviz2 -d /opt/AutowareAuto/share/autoware_auto_examples/rviz2/autoware_perception_stack.rviz
$ ros2 run velodyne_node velodyne_cloud_node_exe __ns:=/lidar_front __params:=/opt/AutowareAuto/share/velodyne_node/param/vlp16_test.param.yaml
$ ros2 run robot_state_publisher robot_state_publisher /opt/AutowareAuto/share/lexus_rx_450h_description/urdf/lexus_rx_450h.urdf
edit retag flag offensive close merge delete

Comments

I think you've got a typo in there. Your first command should be:

$ source /opt/Autoware/setup.bash

WIthout share/.

Josh Whitley gravatar image Josh Whitley  ( 2020-06-11 02:32:03 -0500 )edit

Unfortunately that is not the cause. I have since reinstalled so the paths are different. In one terminal I have inputted

source /opt/AutowareAuto/install/setup.bash
rviz2 -d /opt/AutowareAuto/install/autoware_auto_examples/share/autoware_auto_examples/rviz2/autoware_perception_stack.rviz

And in another:

source /opt/AutowareAuto/install/setup.bash
ros2 run robot_state_publisher robot_state_publisher /opt/AutowareAuto/install/lexus_rx_450h_description/share/lexus_rx_450h_description/urdf/lexus_rx_450h.urdf

I then get the errors listed above in the 1st terminal. I have verified that the LexusRX.obj file is in the correct path. I have also tried different paths in the urdf file ex:

<mesh filename="package://lexus_rx_450h_description/share/lexus_rx_450h_description/meshes/LexusRX.obj" scale="0.001 0.001 0.001"/>

I've also tried copying it to Documents and changing the urdf file to

<mesh filename="file:/home/kcassis/Documents/LexusRX.obj" scale="0.001 0.001 0.001"/>
kcassis gravatar image kcassis  ( 2020-06-18 08:56:00 -0500 )edit

@kcassis It seems like you've installed from source to /opt/AutowareAuto. Is this the case? If so, this is not a supported configuration at this time - only using the ade Docker-based environment is supported at this time.

I can try to help you further if you give me the full list of commands that you used to build and install everything but there is no guarantee that I will be able to solve your problems since this is not a supported configuration.

Josh Whitley gravatar image Josh Whitley  ( 2020-06-18 13:18:31 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-05-10 22:25:55 -0500

noshluk2 gravatar image

I solved this problem my adding path of my meshes folder


1- To CmakeList of the package (for CPP)

################################################################################
# Find ament packages and libraries for ament and system dependencies
################################################################################
find_package(ament_cmake REQUIRED)
find_package(urdf REQUIRED)


install(DIRECTORY launch DESTINATION share/${PROJECT_NAME})
install(DIRECTORY rviz DESTINATION share/${PROJECT_NAME})
install(DIRECTORY urdf DESTINATION share/${PROJECT_NAME})
install(DIRECTORY meshes DESTINATION share/${PROJECT_NAME})

2- Setup.py of the package (for python )

    data_files=[
    ('share/ament_index/resource_index/packages',
        ['resource/' + package_name]),
    ('share/' + package_name, ['package.xml']),
    (os.path.join('share', package_name), glob('launch/*.py')),
    (os.path.join('share', package_name), glob('urdf/*')),
    (os.path.join('share', package_name), glob('meshes/*'))
],
edit flag offensive delete link more

Comments

Any chance you could post your full Setup.py?

jackfrye gravatar image jackfrye  ( 2022-04-05 17:20:29 -0500 )edit

Hi do not have C++ (CMakeLists) based package but i have a python based one github repository

you can see setup.py of the package for multiple paths

noshluk2 gravatar image noshluk2  ( 2022-04-06 04:11:49 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-06-09 13:37:42 -0500

Seen: 1,133 times

Last updated: May 10 '21