microsoft / AirSim

Open source simulator for autonomous vehicles built on Unreal Engine / Unity, from Microsoft AI & Research
https://microsoft.github.io/AirSim/
Other
16.05k stars 4.48k forks source link

roslaunch ERROR when I use WSL of ubuntu18.04 and WIN11 #4863

Open LN-123-hub opened 11 months ago

LN-123-hub commented 11 months ago

Bug report

What's the issue you encountered?

My computer's WSL and WIN11 have successfully communicated, but when I run the command

roslaunch airsim_ros_pkgs airsim_node.launch output:=screen host:=$WSL_HOST_IP

I encountered this error : Client Ver:1 (Min Req:1), Server Ver:1 (Min Req:1) 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 2068, exit code -6, cmd /home/tennis/AirSim-main/ros/devel/lib/airsim_ros_pkgs/airsim_node __name:=airsim_node __log:=/home/tennis/.ros/log/cc8372c4-2770-11ee-9067- 00155d5e1ba8/airsim_node-2.log]. log file: /home/tennis/.ros/log/cc8372c4-2770-11ee-9067-00155d5e1ba8/airsim_node-2*.log

image image

Settings

This is my Settings.json,and I copy it to the WSL bacause of https://github.com/microsoft/AirSim/issues/2009,but it not works :(

{ "SeeDocsAt": "https://github.com/Microsoft/AirSim/blob/main/docs/settings.md", "SettingsVersion": 1.2, "SimMode": "", "Vehicles": { "Drone": { "VehicleType": "SimpleFlight", "DisplayName": "My First Drone", "AutoCreate": true, "Sensors": { "LidarSensor1": { "SensorType": 6, "Range": 200, "Enabled": true, "NumberOfChannels": 16, "RotationsPerSecond": 10, "PointsPerSecond": 300000, "X": 0, "Y": 0, "Z": -1, "Roll": 0, "Pitch": 0, "Yaw": 0, "VerticalFOVUpper": 15, "VerticalFOVLower": -15, "HorizontalFOVStart": -90, "HorizontalFOVEnd": 90, "DrawDebugPoints": true, "DataFrame": "SensorLocalFrame" }, "LidarSensor2": { "SensorType": 6, "Enabled": true, "NumberOfChannels": 4, "RotationsPerSecond": 10, "PointsPerSecond": 10000, "X": 0, "Y": 0, "Z": -1, "Roll": 0, "Pitch": 0, "Yaw": 0, "VerticalFOVUpper": -15, "VerticalFOVLower": -25, "DrawDebugPoints": true, "DataFrame": "SensorLocalFrame" }, "Gps": { "SensorType": 3, "Enabled": true, "EphTimeConstant": 0.9, "EpvTimeConstant": 0.9, "EphInitial": 25, "EpvInitial": 25, "EphFinal": 0.1, "EpvFinal": 0.1, "EphMin3d": 3, "EphMin2d": 4, "UpdateLatency": 0.2, "UpdateFrequency": 50, "StartupDelay": 1 } }, "Cameras": { "camera_1": { "CaptureSettings": [ { "ImageType": 0, "Width": 4000, "Height": 2080, "FOV_Degrees": 90, "TargetGamma": 1.5 } ], "X": 2, "Y": 0, "Z": -1, "Pitch": 0, "Roll": 0, "Yaw": 0 } } } } }

How can the issue be reproduced?

1. 2.

Include full error message in text form

... logging to /home/tennis/.ros/log/cc8372c4-2770-11ee-9067-00155d5e1ba8/roslaunch-7950x-2043.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://7950x:33935/

SUMMARY

PARAMETERS

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 [2054] ROS_MASTER_URI=http://localhost:11311

setting /run_id to cc8372c4-2770-11ee-9067-00155d5e1ba8 process[rosout-1]: started with pid [2065] started core service [/rosout] process[airsim_node-2]: started with pid [2068] process[ned_to_enu_pub-3]: started with pid [2069] Waiting for connection - Connected!

Client Ver:1 (Min Req:1), Server Ver:1 (Min Req:1) 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 2068, exit code -6, cmd /home/tennis/AirSim-main/ros/devel/lib/airsim_ros_pkgs/airsim_node __name:=airsim_node __log:=/home/tennis/.ros/log/cc8372c4-2770-11ee-9067-00155d5e1ba8/airsim_node-2.log]. log file: /home/tennis/.ros/log/cc8372c4-2770-11ee-9067-00155d5e1ba8/airsim_node-2*.log

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

LN-123-hub commented 11 months ago

Because I was in a hurry to work on the project, I didn't debug in detail: the reason for the error was that simmode_name was an empty string, and it seemed that the Setting.json was not read successfully, but I have added Settings.json to the target path according to this plan https://github.com/microsoft/AirSim/issues/2009

Unfortunately it didn't work, so I forced the variable name directly in the Airlib part of the source code, and the program started. If you have other more fundamental solutions, please continue to leave a message

image

FHH7Y8 $IHBSVCI@X1Y{$2U

sandilyasg commented 7 months ago

@LN-123-hub which settings.json do you use for this WSL setup? As in what is the location of the settings.json, is it in your windows wsl directory or in the Documents/Airsim folder on your WSL?