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

Issue with Chinese paths while loading map configuration files #4164

Closed
yangpluseven opened this issue Mar 4, 2024 · 1 comment
Closed

Comments

@yangpluseven
Copy link

Bug report

Required Info:

  • Operating System:
    • Ubuntu 22.04.4 LTS
  • ROS2 Version:
    • humble

Steps to reproduce issue

Create a ROS 2 package under a path that includes Chinese characters (with dependency of nav2_bringup. Complete nav2 configuration files, write launch files to load nodes required for map service (using bringup), add necessary installation statements to CMakeLists, and perform testing.

Expected behavior

Properly load the map configuration file and publish the map topic for nav2 subscription.

Actual behavior

[component_container_isolated-1] [INFO] [1709549582.343171955] [map_server]: Configuring
[component_container_isolated-1] [ERROR] [map_io]: Failed processing YAML file /home/pluseven/u5730u56FE/map_1.yaml at position (-1:-1) for reason: bad file: /home/pluseven/u5730u56FE/map_1.yaml
[component_container_isolated-1] [ERROR] [1709549582.343292300] [map_server]: Caught exception in callback for transition 10
[component_container_isolated-1] [ERROR] [1709549582.343297679] [map_server]: Original error: Failed to load map yaml file: /home/pluseven/u5730u56FE/map_1.yaml
[component_container_isolated-1] [INFO] [map_io]: Loading yaml file: /home/pluseven/u5730u56FE/map_1.yaml
[component_container_isolated-1] [WARN] [1709549582.343305530] [map_server]: Error occurred while doing error handling.
[component_container_isolated-1] [FATAL] [1709549582.343311297] [map_server]: Lifecycle node map_server does not have error state implemented
[component_container_isolated-1] [ERROR] [1709549582.343399847] [lifecycle_manager_localization]: Failed to change state for node: map_server
[component_container_isolated-1] [ERROR] [1709549582.343406656] [lifecycle_manager_localization]: Failed to bring up all requested nodes. Aborting bringup.

Additional information

The provided information caught my attention, particularly the "u5730u56FE" part, which I realized is the encoding of one of my Chinese-named folders. When I moved the map to a path without Chinese characters, the map configuration file could be loaded correctly. However, when I reintroduced Chinese characters into the new path, the issue reappeared.

Feature request

Can someone add support for Chinese paths? Or is there anything wrong with the way I'm handling paths in different languages?

@SteveMacenski
Copy link
Member

It looks to me like that exception would be caused by YAML::LoadFile(yaml_filename);, which is part of the yaml cpp library well outside of Nav2. I suppose you could fix it there, but not alot we can do within Nav2 unless you want to replace over yaml parsing libraries. I believe this is the same yaml library used by ros2 core for ros2 run ... so I think you may run into this same issue in a few different places.

It looks like this was reported as well jbeder/yaml-cpp#1270 and they were redirected to stack overflow, so maybe there are settings we can pass to it to make that possible? I think you should look into that and if so we can add in those parameter options

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