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

Unable to Launch airsim_ros_pkgs airsim_node.launch: Unable to Load Vehicle Settings #3464

Closed
Alvinosaur opened this issue Mar 13, 2021 · 1 comment · Fixed by #3536
Closed
Labels
bug-report for issues filed as bug reports ros

Comments

@Alvinosaur
Copy link

Bug report

  • AirSim Version/#commit: 950a559
  • UE/Unity version: N/A
  • autopilot version:
  • OS Version: Ubuntu 18.04

What's the issue you encountered?

I'm unable to run the following launch command:

roslaunch airsim_ros_pkgs airsim_node.launch

Airsim isn't properly loading my settings.json or any default settings.json file, since the SimMode entry is just an empty string.

Settings

This settings file is located in the path: path/to/Airsim/settings.json

{
  "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/master/docs/settings_json.md",
  "SettingsVersion": 1.2,
  "ClockSpeed": 1,
  "SimMode": "Multirotor",
  "Vehicles": {
  "Drone1": {
    "VehicleType": "simpleflight",
    "AutoCreate": true,
    "X": 0, "Y": 0, "Z": 0,
    "Sensors": {
      "LidarSensor2": {
         "SensorType": 6,
        "Enabled" : true,
        "NumberOfChannels": 1,
        "X": 0, "Y": 0, "Z": -1,
        "DrawDebugPoints": true,
        "DataFrame": "SensorLocalFrame"
      }
    }
  }
  }
}

How can the issue be reproduced?

I directly followed the tutorial on the docs.

## currently in ~/drone_ws/src  ##
git clone https://github.com/Microsoft/AirSim.git;
cd AirSim;
./setup.sh;
./build.sh;
cd ros;
catkin build -DCMAKE_C_COMPILER=gcc-8 -DCMAKE_CXX_COMPILER=g++-8
source ~/drone_ws/devel/setup.bash;
roslaunch airsim_ros_pkgs airsim_node.launch;

You'll notice the only differences are that I specify g++8 compiler and I source my workspace rather than Airsim's ros package directly. This is because Airsim is a package in my workspace and is located in the src directory:
drone_ws
---- src
---------Airsim
---------------ros

Include full error message in text form

I get the following output:

(venv) alvin@alvin:~/drone_ws/src/AirSim$ roslaunch airsim_ros_pkgs airsim_node.launch
... logging to /home/alvin/.ros/log/58335e6c-841f-11eb-b39a-40ec993a4bde/roslaunch-alvin-4895.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://alvin:45243/

SUMMARY
========

PARAMETERS
 * /airsim_node/host_ip: localhost
 * /airsim_node/is_vulkan: False
 * /airsim_node/publish_clock: False
 * /airsim_node/update_airsim_control_every_n_sec: 0.01
 * /airsim_node/update_airsim_img_response_every_n_sec: 0.05
 * /airsim_node/update_lidar_every_n_sec: 0.01
 * /rosdistro: melodic
 * /rosversion: 1.14.10

NODES
  /
    airsim_node (airsim_ros_pkgs/airsim_node)
    ned_to_enu_pub (tf/static_transform_publisher)

auto-starting new master
process[master]: started with pid [4908]
ROS_MASTER_URI=http://localhost:11311

setting /run_id to 58335e6c-841f-11eb-b39a-40ec993a4bde
process[rosout-1]: started with pid [4923]
started core service [/rosout]
process[airsim_node-2]: started with pid [4927]
terminate called after throwing an instance of 'std::invalid_argument'
  what():  Unknown SimMode: , failed to set default vehicle settings
[airsim_node-2] process has died [pid 4927, exit code -6, cmd /home/alvin/drone_ws/devel/lib/airsim_ros_pkgs/airsim_node __name:=airsim_node __log:=/home/alvin/.ros/log/58335e6c-841f-11eb-b39a-40ec993a4bde/airsim_node-2.log].
log file: /home/alvin/.ros/log/58335e6c-841f-11eb-b39a-40ec993a4bde/airsim_node-2*.log
process[ned_to_enu_pub-3]: started with pid [4932]
^C[ned_to_enu_pub-3] killing on exit
^C^C[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

What's better than filing an issue? Filing a pull request :).

@jonyMarino jonyMarino added the ros label Mar 23, 2021
@jonyMarino
Copy link
Collaborator

Hi @Alvinosaur, and welcome!
Please move your settings.json file to ~/Documents

@jonyMarino jonyMarino added the bug-report for issues filed as bug reports label Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report for issues filed as bug reports ros
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants