Open mhowe8 opened 2 years ago
Can you add more debug output?
Running it with valgrind doesn't work either, I think the issue is that I don't have enough space in memory but I will get back to you.
Thread 1 "elev_map_listen" received signal SIGFPE, Arithmetic exception. 0x00007ffff7f5cec1 in grid_map::getIndexFromLinearIndex(unsigned long, Eigen::Array<int, 2, 1, 0, 2, 1> const&, bool) () from /opt/ros/noetic/lib/libgrid_map_core.so (gdb) bt
from /opt/ros/noetic/lib/libgrid_map_core.so
from /opt/ros/noetic/lib/libgrid_map_core.so
at /home/mikey/2022-big-idea-software/src/travels_main/src/elev_map_listener.cpp:674
I am writing my own subscriber to an elevation map. I have my own elevation map stored as a global variable and with each message I convert it into a map and store it as my global map. For some reason, whenever I call functions on this map in main, I get this error:
[elev_map_listener-10] process has died [pid 13617, exit code -8, cmd /home/mikey/travels_ws/devel/lib/travels_main/elev_map_listener name:=elev_map_listener log:=/home/mikey/.ros/log/98279fcc-eda7-11ec-90cc-b1a665a9a6bc/elev_map_listener-10.log]. log file: /home/mikey/.ros/log/98279fcc-eda7-11ec-90cc-b1a665a9a6bc/elev_map_listener-10*.log
However, when I write code that directly involves the map (call elevation_mapping or GridMap functions on the map) in the callback function for the subscriber, or in functions that I call from the callback function, it works fine.
I would like to be able to write my code in main.