uri-ocean-robotics / alpha_auv

ALPHA AUV Code base
https://uri-ocean-robotics.github.io/alpha_auv
GNU General Public License v3.0
8 stars 3 forks source link

Unable to run launch file - parsing of scenario file failed #2

Closed canttach closed 1 year ago

canttach commented 1 year ago

After following installation instructions, when trying to run

roslaunch alpha_bringup bringup_simulation.launch

The scenario parser fails, here are the error messages from the terminal:

[ERROR] Translucent background FBO initialization failed! [INFO] Loaded texture from: /usr/local/share/Stonefish/shaders/logo_gray_64.png [INFO] Loaded texture from: /usr/local/share/Stonefish/shaders/gui.png [INFO] Initialising OpenGL rendering pipeline... [INFO] Loading shaders... [INFO] Loaded texture from: /usr/local/share/Stonefish/shaders/flake.png [ERROR] Display FBO initialization failed! [INFO] Initializing simulation: [INFO] Building scenario... [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Framebuffer initialization failed! [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Framebuffer initialization failed! [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Framebuffer initialization failed! [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Texture dimensions cannot be equal to 0! [ERROR] Framebuffer initialization failed! [ERROR] Framebuffer initialization failed! [INFO] Loaded precomputed atmosphere model (20 wavelengths, 5 scattering orders) [INFO] Scenario parser: Loading scenario from '/home/simcity/catkin_ws/src/alpha_auv/alpha_stonefish/data'. [INFO] Scenario parser: Syntax error in file! [INFO] Scenario parser: Log saved to file '/home/simcity/.ros/log/10816608-7b09-11ed-8cfc-ebff8c7016a8/stonefish_mvp_parser.log'. [ERROR] [1670951439.661715867]: Parsing of scenario file '/home/simcity/catkin_ws/src/alpha_auv/alpha_stonefish/data' failed! [ERROR] [1670951439.662504568]: For more information check the parser log file '/home/simcity/.ros/log/10816608-7b09-11ed-8cfc-ebff8c7016a8/stonefish_mvp_parser.log'.

From stonefish_mvp_parser.log:

[INFO] Scenario file: /home/simcity/catkin_ws/src/alpha_auv/alpha_stonefish/data [ERROR] Syntax error in file!

From rosout.log:

0.000000000 ERROR /stonefish_simulator [/home/simcity/catkin_ws/src/stonefish_mvp/src/ROSSimulationManager.cpp:157(ROSSimulationManager::BuildScenario)] [topics: /rosout, /tf, /clock] Parsing of scenario file '/home/simcity/catkin_ws/src/alpha_auv/alpha_stonefish/data' failed! 0.000000000 ERROR /stonefish_simulator [/home/simcity/catkin_ws/src/stonefish_mvp/src/ROSSimulationManager.cpp:159(ROSSimulationManager::BuildScenario)] [topics: /rosout, /tf, /clock] For more information check the parser log file '/home/simcity/.ros/log/139df57e-780f-11ed-a519-e9bfb009f4d1/stonefish_mvp_parser.log'.

incebellipipo commented 1 year ago

I did a fresh installation but I couldn't replicate the issue.

But at first glance, your issue seems related to the scenario file and stonefish_mvp version.

When run properly, you should've seen a line that looks like this:

[INFO] Scenario parser: Loading scenario from '/home/{USER}/.ros/log/{UUID}/scenario.scn'.

But yours looks like this

[INFO] Scenario parser: Loading scenario from '/home/simcity/catkin_ws/src/alpha_auv/alpha_stonefish/data'.

You can check if you have the correct versions of the packages by retrieving the last commits' hash. Since these packages are in the pre-release phase, they are not tagged with version numbers yet.

git describe --always
As of now, packages should match the hash described in the table (which is their current main branch) Package Hash
mvp_msgs 1f9f9e4
stonefish_mvp 2965b10
stonefish 4e3381a
mvp_control da26f71
mvp_mssion 5f08bd5
alpha_auv e408ac6
canttach commented 1 year ago

Thanks, this solved the issues. I had different versions of the stonefish_mvp package and the alpha_auv package installed. I could not start the local path tracking mission, if I try to call the service

rosservice call /helm/change_state "state: 'survey_local'"

There is an error message that the service is unavailable. The service "alpha/helm/change_state" is available, and when I call it the response is:

state: 'survey_local'" status: True state: name: "survey_local" mode: "flight" transitions:

  • start
  • kill

However, it does not look like the vehicle moves or follows any waypoints. Is this expected?

incebellipipo commented 1 year ago

Controller might not be enabled. You can enable it by typing

rosservice call /alpha/controller/enable

Or you can manually modify the line here to have it enabled on startup. https://github.com/uri-ocean-robotics/alpha_auv/blob/e408ac664995b51e4b6d64aecb7630f5b8af5e6f/alpha_config/config/control_v1-1.yaml#L11

PS: Although it is not observed on every installation, there is an expected issue with the localization stack. When it happens, the robot shows up upside down in RViZ. The fix will be published in a different repository. It can be fixed with a node that transforms IMU data from NED to ENU.