ctu-mrs / mrs_octomap_mapping_planning

Metapackage containing MRS Octomap-based 3D mapper and planner.
GNU General Public License v2.0
12 stars 2 forks source link

Errors obtained during the run of the simulation example of octomap_mapping_planning #10

Closed dorian21b closed 10 months ago

dorian21b commented 1 year ago

Hello I am having a problem running simulation_example from octomap_mapping_planning. I have the native installation (not recommended), I did the tutorials (https://ctu-mrs.github.io/docs/software/catkin/managing_workspaces/managing_workspaces.html) for sourcing the octomap_workspace and for extending the workspaces following the recommended hierarchy.

I also followed the steps from "Backward incompatibility: Updates for px4 firmware v1.13.2 #150.

However, when I run the simulation:

cd ~/octomap_workspace/src/octomap_planning/tmux/simulation_example ./start.sh

Gazebo open and the uav takes off but I have the following errors on the tmux sessions: gazebo, mapplan and easy control

Screenshot from 2023-06-08 10-54-26

Screenshot from 2023-06-08 10-54-35

Screenshot from 2023-06-08 10-54-44

Thank you for your time

pritzvac commented 1 year ago

Hi, sorry for the late answer. The errors in the Gazebo and easy_control tabs shouldn't cause any problems for the simulation. The only problem seems to be crashing of the octomap_server.

Can you run catkin config in all your workspaces and send me the output? Are you on the latest commit of the octomap_mapping_planning repository?

dorian21b commented 1 year ago

Hello Thank you for your answer, I am using the last commit of the octomap_mapping_planning repository.

Screenshot from 2023-06-20 14-45-20

Screenshot from 2023-06-20 14-46-44

pritzvac commented 1 year ago

That looks correct. Do you have Ubuntu 20.04? Did you do a clean install or have you already had the MRS system installed for some time, since you were doing the steps from the backwards incompatibility issue?

Try to also run git pull in uav_modules to get the latest commit there (if you don't have it), re-run the installation script in uav_modules/installation/install.sh and catkin clean and catkin build in all the workspaces.

dorian21b commented 1 year ago

I have Ubuntu 20.04, I did a clean install and I have done the steps from the backward incompatibility issue: https://github.com/ctu-mrs/mrs_uav_system/issues/150

I have run the installation script in uav_modules/installation/install.sh and I have run catkin clean and catkin build in all the workspace. I still get the same errors.

pritzvac commented 1 year ago

Ok, can you please run the simulation, go to the mapplan tab, add debug:=true at the end of the command and launch it again?

It should launch the nodes with the GDB debugger that will open in a new tmux pane. If it crashes again, type bt in the (gdb) prompt and send me the backtrace it outputs (you may need to press enter multiple times to see the full backtrace / get the debugger to run).

dorian21b commented 1 year ago

I have add debug:=true and I tried to run the simulation example (always with the debug) several times and it didn't always work.

When it worked, I got this:

Screenshot from 2023-06-21 14-59-24

When it didn't work, I typed bt in the prompt and I got:

Screenshot from 2023-06-21 14-43-40

Screenshot from 2023-06-21 14-43-50

Then if the simulation worked, I'd tried to run a goto instruction. It didn't always work and I'd get this:

Screenshot from 2023-06-21 14-40-23

Screenshot from 2023-06-21 14-40-34

pritzvac commented 1 year ago

Hmm, something like this used to happen when we were building our packages with the -march=native flag, causing some incompatibilities with the PCL library...

Did you select to "Build PCL from sources" when running the install script for uav_modules, by any chance? It would probably create a PCL_CROSS_COMPILATION variable in your .bashrc file. Is there anything like that in your .bashrc?

dorian21b commented 1 year ago

I didn't select "build PCL from sources". I checked the .bashrc file and there is nothing like that.

pritzvac commented 1 year ago

Ok, I'm not sure where the problem comes from, since it looks like the issue where something is compiled with -march=native, causing memory errors, but your setup looks correct. (we have moved away from using it quite some time ago https://github.com/ctu-mrs/mrs_uav_system/issues/126 so if you have a clean install, it shouldn't be a problem...)

Anyway, I'd try reinstalling the PCL libraries, with something like sudo apt remove ros-noetic-pcl-* and then sudo apt install ros-noetic-pcl-ros ros-noetic-pcl-conversions

Or you can try to build the PCL from sources using the install_pcl.sh script. Just set BUILD_WITH_MARCH_NATIVE to false before you run it.

Or you can try to use the singularity instead of native installation. It might be faster to set up than finding the cause of this issue.

dorian21b commented 1 year ago

Hello, I tried to reinstall the PCL libraries but it did nothing more. then I try to build it from sources but I got the same result. At least I can sometimes run the simulation thanks to the debugger.

klaxalk commented 10 months ago

Hey, with the new system out, you can install our Octomap Mapping Planning package already pre-compiled and working.

curl https://ctu-mrs.github.io/ppa-stable/add_ppa.sh | bash
sudo apt install ros-noetic-mrs-uav-system-full