-
Notifications
You must be signed in to change notification settings - Fork 4.7k
data mismatch between simGetVehiclePose() and simSetVehiclePose() #1246
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
Comments
Looks like you add 10 in the line "currentposition.z_val+stepsize[2]" in which case there is no mismatch. |
stepsize= [0,0,10] 'z_val': 11.820711135864258 is the new current position obtained by simGetVehiclePose() after i set the new positionthus there is mismatch between simSetVehiclePose() and simGetVehiclePose()... |
stepsize= [0,0,10] if there is no mismatch, currentposition = airsim_client.simGetVehiclePose().position |
Try using -10 instead of 10 If that works, tell me if you manage to still control your vehicle afterward and if it's a car or copter. |
Hi, It seems that setVehiclePose only works in computer vision mode, maybe you can check if you have set to 'computer vision mode' in setting.json file. |
My mode is set to default (I have to pick between car and copter when I launch the simulation) Where can I find its implementation in the source code ? Should I just stop using AirSim and find an other simulator ? I've lost so much time over some stupid issues like that, that I doubt I will be able to finish my work in time |
May I know why you use simSetVehiclePose? I didn't try to browse the source code, so I don't know how the move* or set* is implemented. I'm using airsim, I think it's currently the simulator who can both integrate diverse visual environments and do complex physical simulation. |
Because I don't want to wait forever to put my drone in a specific position ? I'm trying to use AirSim for a reinforcement learning project (which I believe AirSim was built for) ... not flying around for fun, so I need some specific functionalities to automatize my learning Also I use coordinates to navigate on my heightmap and I'm forced to put my playerstart position at (0,0,0) in unreal, because any starting position in AirSim is considered to be (0,0,0) and therefore there is only one starting position that gives me the true coordinates. I truly liked how AirSim was presented on some youtube videos and I really thought it would be a walk in the park to use it effectively, but the lack of documentation and help I'm getting is driving me crazy |
for the transformation of position from unreal engine to airsim: Thus, it seems that there is no need to put your playerstart position at (0,0,0) in unreal if you wan to move the agent with airsim api to any position specified in unreal. |
You don't understand Wherever I place my starting position in unreal, the starting position in AirSim (from simGetVehiclePose for example) will always be (0,0,0) at the start of the simulation and future calls on simGetVehiclePose will always give a set of coordinates relative to that starting position, which is only correct if my starting position in Unreal is (0,0,0) as well. |
"Therefore there is an offset on simGetVehiclePose that I don't have access to" The offset between position representation in unreal and airsim will always keep the same: Thus you can access to the offset as long as you know your start position in unreal. |
"Thus you can access to the offset as long as you know your start position in unreal" Anyway this isn't even a big problem, as I need that "teleport" function anyway and I could easily use it to set my offset right |
"I'm not using a simulator/a computer to have to manually set some constants every time I want to change the scene ..." The simulator shouldn't take the responsibility for constructing the scenes, I think this design of airsim is reasonable. But it should take the job for wrapping and reading the scenes constructed by the users who want to test the RL algorithms in the scenes they constructed. Thus, the offset is something that you already know before run airsim when you construct you scenes. |
We can argue all we want, this still doesn't solve my problem ... |
"Because I don't want to wait forever to put my drone in a specific position ?" I'm trying to understand what you want to do with airsim, and according to my understanding, airsim can do what you want. |
It's pretty simple. The usage is pretty irrelevant but there it is : The move functions only control the vehicle to reach a destination, which takes some time and is definitely not what I want |
"replay from some known positions" Can you move the agent to some known positions with airsim move and pretend the drone restarts from this position, rather than really disconnet the airsim client and restart the game? |
Using move would be extremely ineffective so no, I can't pretend and use it Also by replay I don't mean disconnect everything to restart |
Learning to control the vehicle in low level action spaces with moveByAngleThrottleAsync and put the vehicle instantly to a given state, I feel the two demands are kind of contradictory. Have you find any other simulator that can satisfy your project? |
How are these contradictory ? These two functions would be for totally different purpose Why would I need to wait to get to point B from point A if I only need to learn something from the surrounding of point B ? Just because you can pick your nose with your fingers doesn't mean you can't use them for an other purpose |
"learn something from the surrounding of point B ", Actually, what your project want the airsim to do is to switch between "car"/"multirotor" mode and "computer vision" mode after click the playing button; |
Hi @Gotfeurdom, have you find any solutions to reset the position after each episode learning? |
Hi |
I have also noticed the same problem in using moveToPositionAsync() and simGetVehiclePose.position. Initially I am sending a multicopter to position (10, 0, -10) and then I retrieve the position using the simGetVehiclePose.position values (for x,y,z coordinates) the result is (x=15.57, y=15.55, z=-9.99). I have also noticed the same problem in other positions. I think that this is a huge bug ... Am I missing anything ? |
Same error occurs if I use client.getMultirotorState().kinematics_estimated.position. This make sence since both getMultirotorState() and simGetVehiclePose() use the same function in airsim/types.py |
@dimikout3 |
Came across this issue while adding docstrings for all APIs |
Closed due to age. *Make sure to write all reproduction steps Thanks! |
The text was updated successfully, but these errors were encountered: