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

elevation_mapping_node dies on startup due to pybind import problem #41

Open
camkisailus opened this issue Dec 1, 2022 · 7 comments
Open

Comments

@camkisailus
Copy link

Hi! I am trying to run this code on Ubuntu 18.04 with ROS melodic. I am able to build the code successfully (using catkin build -DPYTHON_EXECUTABLE=$(which python3)) , but am encountering a runtime error
image

that I have traced to this line. I have already tried setting the PYTHONPATH env variable in the launch file as discussed in the README, but that does not fix the problem.

What is interesting is that I am able to call py::module::import("elevation_mapping_cupy") without error, but py::module::import("elevation_mapping_cupy.elevation_mapping") will cause the node to die.

Any help on this problem would be greatly appreciated!

@camkisailus camkisailus changed the title Pybind import issue elevation_mapping_node dies on startup due to pybind import problem Dec 1, 2022
@mktk1117
Copy link
Collaborator

mktk1117 commented Dec 9, 2022

Thank you for this!
Can you check which line in elevation_mapping.py kills the process?
I suspect one of the import in that file.

@huangyoupingben
Copy link

@mktk1117 ,Hi there.
Same issue for me. py::module::import("elevation_mapping_cupy.elevation_mapping") cause the error.
I check elevation_mapping.py with some print. I find that the following code is the reason that kill the process.
1) from .map_initializer import MapInitializer
2) from .plugins.plugin_manager import PluginManger
3) from .traversability_polygon import (
get_masked_traversability,
is_traversable,
calculate_area,
transform_to_map_position,
transform_to_map_index,
)

Code run on Ubuntu 18.04 with ROS melodic.

2
3
4
1

@huangyoupingben
Copy link

huangyoupingben commented Dec 10, 2022

More details

  1. from .map_initializer import MapInitializer
    from scipy.interpolate import griddata in map_initializer.py cause the dead process.
  2. from .plugins.plugin_manager import PluginManger
    from ruamel.yaml import YAML in plugin_manager.py cause the dead process.
  3. from .traversability_polygon import
    from shapely.geometry import Polygon, MultiPoint in traversability_polygon.py cause the dead process.

@mktk1117
Copy link
Collaborator

thanks for detailed checks. seems like it is from some library installation or version.
Could you resolve this issue?

@hsurya08
Copy link

Hi, I was facing the same issue with the convex_plane_decomposition_ros node. Any possible solutions?
Thanks in advance!

@zhengnx0906
Copy link

More details

  1. from .map_initializer import MapInitializer
    from scipy.interpolate import griddata in map_initializer.py cause the dead process.
  2. from .plugins.plugin_manager import PluginManger
    from ruamel.yaml import YAML in plugin_manager.py cause the dead process.
  3. from .traversability_polygon import
    from shapely.geometry import Polygon, MultiPoint in traversability_polygon.py cause the dead process.

I solved part of the problem by change the import like this: import shapely
in the used function: shapely.geometry.Polygon

but i met the new problem, and i can't locate it

@zhengnx0906
Copy link

More details

  1. from .map_initializer import MapInitializer
    from scipy.interpolate import griddata in map_initializer.py cause the dead process.
  2. from .plugins.plugin_manager import PluginManger
    from ruamel.yaml import YAML in plugin_manager.py cause the dead process.
  3. from .traversability_polygon import
    from shapely.geometry import Polygon, MultiPoint in traversability_polygon.py cause the dead process.

I solved part of the problem by change the import like this: import shapely in the used function: shapely.geometry.Polygon

but i met the new problem, and i can't locate it

Ok, I finanlly sloved this problem by using this method one by one.
0830
How can i import the publishing rate? Is it related to my hardware? And what is the maximum capacity

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

5 participants