Unexpected error when building my package (#578)

Posted by @Narayan-007:

I am currently working on a project where I am creating a simulation world to demonstrate the various tasks in Open-RMF. I took a short break from it, and when I try to rm -rf my build and install directories for this package and colcon build it, I am getting the below error:

fyp-user@rric:~/rmf_ws$ colcon build --packages-select rmf_gazebo
Starting >>> rmf_gazebo
--- stderr: rmf_gazebo                                
[Err] [FuelClient.cc:717] Failed to download model.
  Server: https://fuel.gazebosim.org
  Route: openrobotics/models/teleportingestor/tip/teleportingestor.zip
  REST response code: 404
[Err] [FuelClient.cc:717] Failed to download model.
  Server: https://fuel.gazebosim.org
  Route: openrobotics/models/teleportingestor/tip/teleportingestor.zip
  REST response code: 404
[Err] [FuelClient.cc:717] Failed to download model.
  Server: https://fuel.gazebosim.org
  Route: openrobotics/models/teleportingestor/tip/teleportingestor.zip
  REST response code: 404
[Err] [FuelClient.cc:717] Failed to download model.
  Server: https://fuel.gazebosim.org
  Route: openrobotics/models/teleportingestor/tip/teleportingestor.zip
  REST response code: 404
[Err] [FuelClient.cc:717] Failed to download model.
  Server: https://fuel.gazebosim.org
  Route: openrobotics/models/teleportingestor/tip/teleportingestor.zip
  REST response code: 404
[Err] [FuelClient.cc:717] Failed to download model.
  Server: https://fuel.gazebosim.org
  Route: openrobotics/models/teleportingestor/tip/teleportingestor.zip
  REST response code: 404
[Err] [FuelClient.cc:717] Failed to download model.
  Server: https://fuel.gazebosim.org
  Route: openrobotics/models/teleportingestor/tip/teleportingestor.zip
  REST response code: 404
[Err] [FuelClient.cc:717] Failed to download model.
  Server: https://fuel.gazebosim.org
  Route: openrobotics/models/teleportingestor/tip/teleportingestor.zip
  REST response code: 404
[Err] [FuelClient.cc:717] Failed to download model.
  Server: https://fuel.gazebosim.org
  Route: openrobotics/models/teleportingestor/tip/teleportingestor.zip
  REST response code: 404
[Err] [FuelClient.cc:717] Failed to download model.
  Server: https://fuel.gazebosim.org
  Route: openrobotics/models/teleportingestor/tip/teleportingestor.zip
  REST response code: 404
gmake[2]: *** [CMakeFiles/generate_my_environment_2_world.dir/build.make:74: maps/my_environment_2/my_environment_2.world] Error 1
gmake[2]: *** Deleting file 'maps/my_environment_2/my_environment_2.world'
gmake[1]: *** [CMakeFiles/Makefile2:201: CMakeFiles/generate_my_environment_2_world.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< rmf_gazebo [17.3s, exited with code 2]

Summary: 0 packages finished [18.0s]
  1 package failed: rmf_gazebo
  1 package had stderr output: rmf_gazebo

I also got the same error for ‘teleportdispenser’ the first time I ran it, why is this occuring? I never got this issue before.


Edited by @mxgrey at 2025-01-02T04:08:18Z

Chosen answer

Answer chosen by @luca-della-vedova at 2025-01-02T05:55:12Z.
Answered by @luca-della-vedova:

Hello!

I noticed that the model that is failing to download is specifically the TeleportIngestor. This model is indeed not uploaded to Fuel so the failure is expected (it is instead present in the rmf_demos_assets package).
I also noticed that the error you get is a FuelClient error, suggesting that the models are being downloaded through Fuel rather than plain HTTP requests.

Two ideas, with the first being the preferred one:

  1. You can switch to not use Fuel for your model downloads and just pure http requests. This was done in rmf_demos some time ago (removing the -f flag here) so updating your rmf_gazebo CMakeLists.txt file the same way should fix the issue.
  2. Another alternative, if you are not doing delivery tasks, you can just remove any TeleportIngestor from your map, there should be instances of OpenRobotics/TeleportIngestor in your .building.yaml file, since I see that there are not TeleportDispenser models being reported as missing this might work for you.

Finally, since we haven’t used the -f flag in a long time it stopped working but this sounds like an issue that should be fixed. I’ll look into it

Posted by @mxgrey:

I don’t know what the rmf_gazebo package is. I don’t believe we distribute any package with that name.

In any case the error you’re getting shows a 404 error which means for some reason your computer was unable to reach the fuel server. It seems the build process of your rmf_gazebo package involves fetching model data from fuel via the internet, so make sure that whatever computer you’re building from has internet access. It’s also possible that the fuel server was temporarily down, in which case the build might work if you try it later.

Posted by @Narayan-007:

rmf_gazebo is a package that I created. It has launch files, dashboard config files and a few others. It’s using the RMF files, so in other words it’s just a package that has configurations for my simulation world and RMF system. The problem is that I tried this a week ago, and it returned me the same error. I have tried to access the link to the model, but it’s returning me the same error as shown. I have already locally installed the model, and have done the source /usr/share/gazebo/setup.sh as well. Sorry for the confusion. But do you have ideas on why this error is popping up? I also wanted to ask, where is model being referenced? I cannot find it.

Posted by @luca-della-vedova:

Hello!

I noticed that the model that is failing to download is specifically the TeleportIngestor. This model is indeed not uploaded to Fuel so the failure is expected (it is instead present in the rmf_demos_assets package).
I also noticed that the error you get is a FuelClient error, suggesting that the models are being downloaded through Fuel rather than plain HTTP requests.

Two ideas, with the first being the preferred one:

  1. You can switch to not use Fuel for your model downloads and just pure http requests. This was done in rmf_demos some time ago (removing the -f flag here) so updating your rmf_gazebo CMakeLists.txt file the same way should fix the issue.
  2. Another alternative, if you are not doing delivery tasks, you can just remove any TeleportIngestor from your map, there should be instances of OpenRobotics/TeleportIngestor in your .building.yaml file, since I see that there are not TeleportDispenser models being reported as missing this might work for you.

Finally, since we haven’t used the -f flag in a long time it stopped working but this sounds like an issue that should be fixed. I’ll look into it


This is the chosen answer.

Posted by @Narayan-007:

Hi, thanks for the reply. I have installed the model locally on my ubuntu laptop already, and I have done the source /usr/share/gazebo/setup.sh as well. But this error is still occuring.

The other issue is that I do require delivery tasks for my simulation, but interestingly enough when I ran the simulation world a few weeks ago I did not get this error. But when I tried it last week and today, it pops up unexpectedly.

I am not sure where the -f flag is to be honest. This is my CMakelist.txt file for the rmf_gazebo package:
cmake_minimum_required(VERSION 3.8)
project(rmf_gazebo)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES “Clang”)
add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find dependencies

find_package(ament_cmake REQUIRED)
find_package(gazebo_ros REQUIRED)

find_package(rmf_building_map_tools REQUIRED)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)

the following line skips the linter, which checks for copyrights

uncomment the line when copyright and license are not present in all source files

set(ament_cmake_copyright_FOUND TRUE)

the following line skips cpplint (only works in a Git repo)

uncomment the line when this package is not in a Git repo

set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()

ament_package()

message(NOTICE “Starting Compilation…”)

file(GLOB_RECURSE traffic_editor_paths “rmf_config/*.building.yaml”)

foreach(path {traffic_editor_paths}) message(NOTICE "path: {path}")

Get the output world name

string(REGEX REPLACE "\.[^.].[^.]" "" no_extension_path {path})
string(REGEX MATCH "[^/]+" world_name {no_extension_path})

set(map_path {path}) set(output_world_name {world_name})
set(output_dir {CMAKE_CURRENT_BINARY_DIR}/maps/{output_world_name})
set(output_world_path {output_dir}/{output_world_name}.world)
set(output_model_dir ${output_dir}/models)

message(NOTICE “map_path: {map_path}") message(NOTICE "output_world_name: {output_world_name}”)
message(NOTICE “output_dir: ${output_dir}”)

message(NOTICE “output_world_path: {output_world_path}") message(NOTICE "output_model_dir: {output_model_dir}”)

##############################################################################

Generate Gz world and download Models

##############################################################################

message(NOTICE “BUILDING WORLD FILE WITH COMMAND: ros2 run rmf_building_map_tools building_map_generator gazebo {map_path} {output_world_path} {output_model_dir}") message(NOTICE "....Downloading Models and Building to {output_model_dir}”)
add_custom_command(
OUTPUT {output_world_path} COMMAND ros2 run rmf_building_map_tools building_map_generator gazebo {map_path} {output_world_path} {output_model_dir}
COMMAND ros2 run rmf_building_map_tools building_map_model_downloader {map_path} -f -e {output_model_dir}
DEPENDS ${map_path}
)

add_custom_target(generate_{output_world_name}_world ALL DEPENDS {output_world_path}
)

message(NOTICE “…Downloading and Building Models to ${output_model_dir} >>>>> DONE”)

message(NOTICE “…BUILDING WORLD FILE…DONE”)

##############################################################################

Generate the nav graphs

##############################################################################

set(output_nav_graphs_dir {output_dir}/nav_graphs/) set(output_nav_graphs_phony {output_nav_graphs_dir}/phony)
message(NOTICE "…Generating Lane Graphs in {output_nav_graphs_dir}") add_custom_command( OUTPUT {output_nav_graphs_phony}
COMMAND ros2 run rmf_building_map_tools building_map_generator nav {map_path} {output_nav_graphs_dir}
DEPENDS ${map_path}
)

add_custom_target(generate_{output_world_name}_nav_graphs ALL DEPENDS {output_nav_graphs_phony}
)

install(
DIRECTORY {output_dir} DESTINATION share/{PROJECT_NAME}/maps
)

message(NOTICE “…Generating Lane Graphs in ${output_nav_graphs_dir}…DONE”)

##############################################################################

Copy Generated Map to package with different name

##############################################################################

string(REGEX REPLACE "\.[^.].[^.]" "" no_extension_path {path})

if( "{output_world_name}" STREQUAL "my_hospital") set(copyworld_phony {no_extension_path}/phony)
message(NOTICE “…Copying World from {output_world_path} {no_extension_path}”)
add_custom_command(
OUTPUT {copyworld_phony} COMMAND cp -rf {output_world_path} {no_extension_path}_copy.world DEPENDS {output_world_path}
)

add_custom_target(${output_world_name}_generate_freezeworld ALL
  DEPENDS ${copyworld_phony}
)

else()
message(“Not Copying world file ${output_world_name}”)
endif()

endforeach()

install(DIRECTORY
rmf_config
adapter_config
dashboard_config
rviz_config
launch
custom_tasks
tasks_list
DESTINATION share/${PROJECT_NAME}
)

How do I edit this properly so that this error can be resolved and I can continue to use the delivery tasks.

Posted by @luca-della-vedova:

I am not sure where the -f flag is to be honest. This is my CMakelist.txt file for the rmf_gazebo package:

I’m sorry but I’ll have to ask you to pay more attention to my instructions. I sent you a link to the line of code with the -f flag. I did a string search on the snippet you pasted for -f and it highlighted exactly one occurrence, which looks pretty much like the line of code I pointed you to.

Posted by @luca-della-vedova:

Regarding the issue itself I opened a PR in rmf_traffic_editor Fix pit crew missing models and authorship logic by luca-della-vedova · Pull Request #522 · open-rmf/rmf_traffic_editor · GitHub. Note however that from what I see you are using Gazebo classic and a very old version of the code so this probably won’t help you specifically (unless you update your OS / simulator, but in that case this issue wouldn’t have surfaced in the first place)

Posted by @Narayan-007:

Never mind, I managed to see the code the next minute after sending you the reply, thanks. Hmm, I am surprised that it is old to be honest, as I used some of the code from the Robot Fleet Management in The Construct. I would assume it’s not too old. But yes, thanks for opening the PR.

Posted by @luca-della-vedova:

Interesting, thanks for letting me know that it was based on The Contruct’s humble build. I removed the model that caused the issue from fuel as a hotfix for that usecase, I’ll make sure to not reupload until we have backported and re-released the fix for humble