ctu-mrs / mtsp_planning_task

A path-planning task for the summer school based on the Multiple Traveling Salesman Problem (MTSP)
BSD 3-Clause "New" or "Revised" License
17 stars 8 forks source link

Can't find find a way to start Gazebo simulation #1

Closed kurshakuz closed 4 years ago

kurshakuz commented 4 years ago

Hello,

After the installation, I run the mtsp_state_machine/tmux/test/start.sh command which then shows the following terminal configuration:

Screenshot from 2020-09-15 11-24-38

However, the Gazebo simulation does not seem to open.

python mtsp_planner/scripts/planner.py plots the trajectories and velocity profiles nicely.

klaxalk commented 4 years ago

Hey, what does the output of Gazebo look like? Scroll to the left through the tmux windows by +.

kurshakuz commented 4 years ago

@klaxalk

I have not used tmux before and looks like I have changed some initial configurations. Even when I rebuild the mtsp_planning_task package, my config in tmux remains. Can you please share how to do that?

Nevertheless, I found that the issue happens when I try to spawn the drone using this command: waitForSimulation; spawn_uav 1 --$UAV_TYPE --run --delete --enable-rangefinder --enable-ground-truth --file pos1.yaml

image

Looks like the issue is with the mavros and I am not sure how to solve it. Should I run the install_geographiclib_datasets.sh again?

kurshakuz commented 4 years ago

To give you some background, I had issue during the initial run of the install.sh script. To be exact, the bash $MY_PATH/dependencies/mavros.sh --compile was returning error and inside it

  #echo "$0: Installing geographic lib"
  [ -z "$DRYRUN" ] && ( sudo $MY_PATH/../../ros_packages/mavros/mavros/scripts/install_geographiclib_datasets.sh || sudo $MY_PATH/../../ros_packages/mavros/mavros/scripts/install_geographiclib_datasets.sh || sudo $MY_PATH/../../ros_packages/mavros/mavros/scripts/install_geographiclib_datasets.sh )

was giving error.

Therefore, I commented the line above and run the sudo /../../ros_packages/mavros/mavros/scripts/install_geographiclib_datasets.sh independently and then full installation succeeded.

Do you think that the issue may be due to the above steps?

klaxalk commented 4 years ago

Ah, first sorry, i have not noticed that <shift>+<left> got translate to + by github. But I see you figured it out.

Yes, it really needs the geographic lib, which you commented out. Could you maybe try to run the scripts for installing the geographiclib again? If there is an issue with that, we need to resolve it, not skip it.

kurshakuz commented 4 years ago

I run the: ~/mrs_workspace/src/uav_core/installation/dependencies$ sudo ./../../ros_packages/mavros/mavros/scripts/install_geographiclib_datasets.sh

independently and output is as image

But when I run: ~/mrs_workspace/src/uav_core/installation$ bash ./dependencies/mavros.sh --compile This happen again: image

I honestly, don't understand why this is happening. During the script there seems to be no issue, full output is in the gist: https://gist.github.com/kurshakuz/c0cbedf48eba733f77f7d6947f4d9c05

Also, why does install_geographiclib_datasets.sh is listed three times. Is there any reason for that?

klaxalk commented 4 years ago

It looks like something really fails in install_geographiclib_datasets.sh. It is there multiple times because it often fails due to poor networking --- this script downloads some stuff from the internet.

Even when you run ~/mrs_workspace/src/uav_core/installation/dependencies$ sudo ./../../ros_packages/mavros/mavros/scripts/install_geographiclib_datasets.sh separately, it probably failed (check the return code echo $?). When you run it again and it succeeds, it should tell you it is skipping the stuff it already has:

mavros.sh: Installing geographic lib
GeographicLib geoids dataset egm96-5 already exists, skipping
GeographicLib gravity dataset egm96 already exists, skipping
GeographicLib magnetic dataset emm2015 already exists, skipping
kurshakuz commented 4 years ago

echo $? returns 8

I will dive deeper and what else I can do. If you have any how to solve, please let me know

klaxalk commented 4 years ago

It is not our script so I don't have any ideas now. But looking into it, it runs for example

geographiclib-get-magnetic

which downloads the data. So check if you have this command at all

whereis geographiclib-get-magnetic

which in my case returns

geographiclib-get-magnetic: /usr/sbin/geographiclib-get-magnetic /usr/share/man/man8/geographiclib-get-magnetic.8.gz
kurshakuz commented 4 years ago

@klaxalk THANK YOU!!!

I have tried running geographiclib-get-magnetic and found out that my connection is redirecting to different sources 20 times. Now I have tried using other internet connection and everything worked!

Thank you, Tomáš, you are awesome!

klaxalk commented 4 years ago

Glad I could help :-)