-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Fix actor name conflict for multiple ComputerVision vehicles #4109
Conversation
Hi, @rajat2004, this fix can though survive the test setting above, it will crash Unreal when using the simAddVehicle() API to spawn "computervision" pawn during runtime. Please add the following dummy program to the test case also, along with the settings.json file above:
|
Hi, @rajat2004, this fix can though resolve pawn name conflict, the x, y, z initial position settings from the settings.json file above is not respected. Please add the following dummy program to the test case also, along with the settings.json file above:
See the printed orientation&position inquiries differs from the JSON setting. |
I tried
This is happening with both CV and Car vehicles, so not something specific to this. I'll work on this separately. As for the incorrect pose, that's another issue which needs looking into 😞 |
Hi, @rajat2004, the error message from [#4092 (comment)] is actually from f1ccd2d109073e2b16506a5ed31240ffad92d815, microsoft/AirSim:master, not the one that we are talking about in this pull request. Actually my error message with
|
This is strange, the vehicle pose is getting updated correctly when using it with Settings, script and outputTest with Car, Multirotor and CV mode by modifying settings {
"SettingsVersion": 1.2,
"SimMode": "ComputerVision",
"Vehicles": {
"Cam1": {
"VehicleType": "ComputerVision",
"X": 0,
"Y": -5,
"Z": 0
},
"Cam2": {
"VehicleType": "ComputerVision",
"X": 0,
"Y": 5,
"Z": 0
}
}
} import airsim
if __name__ == "__main__":
cl = airsim.VehicleClient()
cl.confirmConnection()
vehicles = cl.listVehicles()
for vehicle in vehicles:
pose = cl.simGetVehiclePose(vehicle)
print(f"{vehicle}: {pose}")
pose.position.x_val += 10
cl.simSetVehiclePose(pose, True, vehicle)
print(f"New pose of {vehicle}: {cl.simGetVehiclePose(vehicle)}") Output:
|
I still need to figure out the best to fix this, but if you're stuck at this issue and need to use runtime vehicle creation with CV mode, you can comment out this line (Note that this will break the API for multirotors, hence need to think on the best way to fix it)
|
Thanks 🙏, @rajat2004. 👍 Maybe you can take a moment to peek into #4111, I suspect it's also interelated. |
Prefix camera names with vehicle name
2a98399
to
cee7b52
Compare
Tested this locally and it works for me, so I am moving ahead with merging. Thanks for the contribution @rajat2004! |
Thanks @zimmy87! You're on fire the last few days with all the PRs🔥 |
@Octavian-Zhang would be great if you could try out #4203 and see if it fixes the CV |
Fixes: #4092
About
Fixes the name conflict by including the vehicle name
How Has This Been Tested?
With the below settings from #4092
Screenshots (if appropriate):