-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
AirSim ROS wrapper uses settings.json at default path, regardless of settings given to AirSim #3530
Comments
Hey, could you test my branch at https://github.com/rajat2004/AirSim/tree/ros-settings, I added an API to get the settings text which Airsim uses, and then the ROS wrapper calls the API to get the same text. This should remove the problem of different settings files, since only the Airsim binary or running in Editor will read the file. Needs some more cleanup, will probably open a PR after that |
Hey @rajat2004, thanks for adding the API, I was also thinking that this approach should be the one to solve this issue. I have fetched and built your branch. However, I'm not sure how to test it since I was using the Landscape Mountains environment that I have downloaded in binary format, under Linux. I normally use the command |
You can try building Airsim from source and using the Blocks environment, but if you haven't done that before then it will require downloading and building UE4, which takes time and space. I could have built a binary for Linux, however I'm travelling currently and don't have my laptop with me. This is the reason why I wanted to have the ability to download binaries from the Azure CI, it already builds and zips it up as well, I think only thing left is to upload it as an artifact. I can't myself test and add this feature since that requires access to the Azure DevOps stuff, but the maintainers should be able to. |
Actually I have built UE4 and Airsim from source (including your changes). But I am not sure how to specify a custom settings file for Blocks environment, since I was running that environment under Unreal Editor with a command like |
The arguments can be passed in the same manner, like To generate the Blocks.sh and binary you'll need to package the environment, see UE4 Packaging for the steps |
Bug report
What's the issue you encountered?
AirSim has the ability to load settings using 4 different ways, as described in docs. For example, one can give the path to a specific settings file with the
--settings
command line argument, instead of loading the settings from~/Documents/AirSim/settings.json
. However, while AirSim can load the correct settings as described in the docs, the AirSim ROS wrapper always uses settings from the file at default path, i.e.~/Documents/AirSim/settings.json
.Therefore, if one starts an Unreal Engine environment binary with different settings (other than the one at the default path), this gives result to an inconsistency between the real settings used by AirSim, and the settings AirSim ROS wrapper thinks that are used. This inconsistency can cause many more issues on the ROS side. As an example, please read the settings and reproducing steps below.
Settings
I use two different setting files to demonstrate the issue, which I share in this gist. First, we have a
my_settings.json
file that we give to AirSim, with a command like/home/bercan/Downloads/LandscapeMountains/LinuxNoEditor/LandscapeMountains.sh --settings '/home/bercan/Documents/AirSim/my_settings.json'
. Second, we have asettings.json
file with the default name, which we put at the default path (under~/Documents/AirSim
on Linux systems). Both of these setting files include a camera, and the only difference they have is the camera name, withmy_settings.json
havingMyCamera1
as the name, andsettings.json
havingCamera1
.How can the issue be reproduced?
settings.json
and second having a different name, such as the ones that I share in this gist, and put them on default folder (under~/Documents/AirSim
on Linux systems)./home/bercan/Downloads/LandscapeMountains/LinuxNoEditor/LandscapeMountains.sh --settings '/home/bercan/Documents/AirSim/my_settings.json'
, and observe that the correct settings at 'my_settings.json' are loaded, as in the screenshot below.roslaunch airsim_ros_pkgs airsim_node.launch
rostopic list
, observe that the AirSim ROS wrapper tries to publish camera images from a camera namedCamera1
as insettings.json
, instead ofMyCamera1
as inmy_settings.json
.rostopic echo /airsim_node/MyCar/Camera1/Scene/compressed
, observe that the camera images are not actually published.The text was updated successfully, but these errors were encountered: