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

Which drone do I control for the validation leaderboard? #48

Closed
ctoumieh opened this issue Sep 7, 2019 · 7 comments
Closed

Which drone do I control for the validation leaderboard? #48

ctoumieh opened this issue Sep 7, 2019 · 7 comments

Comments

@ctoumieh
Copy link

ctoumieh commented Sep 7, 2019

Hi,

When we upload the files for the validation leaderboard, which drone does it choose to publish its results?
Also, It seems as if the world reference frame for drone_2 is different then that of drone_1 and the one used to get gate poses. While testing, according to simGetVehiclePose drone_2 should be in the middle of the gate whereas it is not (translated by a constant vector). If you try baseline_racer with drone_2, you can see the issue.

Cheers,
CT

@msb336
Copy link
Contributor

msb336 commented Sep 9, 2019

"drone_1" is the drone who's results will appear on the leaderboard. With regards to your reference frame issue, this is an expected behavior. Each drone has it's own reference frame based on your settings file, but simGetObjectPose always returns poses in drone_1's reference frame. You will have to account for that offset on your own.

(or you can specify in your settings file that both drones spawn into the same position, and then they will share an identical reference frame)

@ctoumieh
Copy link
Author

ctoumieh commented Sep 9, 2019

Ok thx!

@ctoumieh ctoumieh closed this as completed Sep 9, 2019
@ctoumieh
Copy link
Author

ctoumieh commented Sep 9, 2019

@msb336 I notice the leaderboard does not display french characters. I already registered with the french team name. Is that an issue or do you prefer characters without accents?

@msb336
Copy link
Contributor

msb336 commented Sep 9, 2019

@ctoumieh

French characters aren't an issue for us in terms of recordkeeping, but it may be some time before the leader board is able to properly display special characters

madratman added a commit to madratman/AirSim-NeurIPS2019-Drone-Racing that referenced this issue Sep 20, 2019
@madratman
Copy link
Contributor

@ctoumieh thanks for bringing this up.
I realized they do not need to be in different reference frames as simStartRace just teleports the meshes. The participant can simply get the start pose (via simGetVehiclePose or simGetMultirotorState), as done in takeoff_with_moveOnSpline() in baseline_racer.py. Relevant snippet:

        start_position = self.airsim_client.simGetVehiclePose(vehicle_name=self.drone_name).position
        takeoff_waypoint = airsim.Vector3r(start_position.x_val, start_position.y_val, -takeoff_height)

        self.airsim_client.moveOnSplineAsync([takeoff_waypoint], vel_max=15.0, acc_max=5.0, add_position_constraint=True, add_velocity_constraint=False, 
            add_acceleration_constraint=False, viz_traj=self.viz_traj, viz_traj_color_rgba=self.viz_traj_color_rgba, vehicle_name=self.drone_name).join()

@ugurkanates
Copy link

ugurkanates commented Sep 29, 2019

Maybe kinda unrelated but @madratman how do i let drone_2 to move according to fly_through_all_gates_at_once_with_moveOnSpline().join() function ? Is it bugged or am i doing something wrong

What i do is create two objects

baseline_racer = BaselineRacer(drone_name="drone_1",viz_traj_color_rgba=[1.0, 1.0, 0.0, 1.0])
baseline_racer2 = BaselineRacer("drone_2",viz_traj_color_rgba=[1.0, 1.0, 0.0, 1.0])

Start race with either drone(doesn't matter) , initalise them and use take_off Async functions but all my commands apply for drone_1. If i dont create a drone_1 object then race starts but take off function doesn't still apply to neither drones.
I simply couldn't way to fly drone_2 . Didnt change any settings (.json)

Also

print(baseline_racer.airsim_client.simGetVehiclePose())
{ 'orientation': { 'w_val': 0.7071069478988647,
'x_val': -0.0,
'y_val': 0.0,
'z_val': 0.7071065902709961},
'position': { 'x_val': 0.75,
'y_val': -2.0,
'z_val': -3.2671926021575928}}

print(baseline_racer2.airsim_client.simGetVehiclePose())
{ 'orientation': { 'w_val': 0.7071069478988647,
'x_val': -0.0,
'y_val': 0.0,
'z_val': 0.7071065902709961},
'position': { 'x_val': 0.75,
'y_val': -2.0,
'z_val': -3.2671926021575928}}

Returns this , I gave different drone names both using drone_name ="drone_2" and just passing "drone_2"

But using this

print(baseline_racer.airsim_client.simGetVehiclePose("drone_2"))
{ 'orientation': { 'w_val': 0.7071069478988647,
'x_val': -0.0,
'y_val': 0.0,
'z_val': 0.7071065902709961},
'position': { 'x_val': -0.75,
'y_val': -3.0,
'z_val': 2.720752716064453}}

gives correct positions even though baseline object created with "drone_1"

@madratman
Copy link
Contributor

@ugurkanates @ctoumieh @yannbouteiller
we just updated the python client to version 0.3.0.
drone_2 will now fly automatically as soon as you call simstartrace()

Note that for tier=2 and tier=3, simgetobjectpose() will return noisy gate poses now, so baseline_racer.py will follow these noisy poses (and probably hit stuff)
baseline_racer.py will still go through the center of gates if tier=1 is passed to simStartRace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants