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

Feature Request: Addtional cameras for bird view over self driving cars #1896

Closed
tchaton opened this issue Apr 18, 2019 · 1 comment · Fixed by #3320
Closed

Feature Request: Addtional cameras for bird view over self driving cars #1896

tchaton opened this issue Apr 18, 2019 · 1 comment · Fixed by #3320

Comments

@tchaton
Copy link

tchaton commented Apr 18, 2019

Good morning,

I would like to add additional cameras with given ImageType at a given position.

Either linked at a car but 50 meters over it , or fixed somewhere at 20 meters (CCTV).

Best,

@tchaton
Copy link
Author

tchaton commented Apr 25, 2019

I have found how to do it.

def perform_sky_pose(client, name_vehicules):
    original_pose = {}
    client.simPause(False)
    for name in name_vehicules:
        pose = client.simGetVehiclePose(name)
        original_pose[name] = pose
        pose_copy = copy.deepcopy(pose)
        angles = airsim.utils.to_eularian_angles(pose.orientation) #pitch, roll, yaw
        angles = [angles[i] for i in range(len(angles))]
        print_angles(angles)
        angles[0] = np.deg2rad(-75)
        pose_copy.orientation = airsim.utils.to_quaternion(*angles)
        angles_after = airsim.utils.to_eularian_angles(pose_copy.orientation)
        print_angles(angles_after)
        print()

        pose_copy.position.z_val -= 50
        client.simSetVehiclePose(pose_copy, True, name)
    time.sleep(0.01)
    client.simPause(True)
    return client, original_pose

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

Successfully merging a pull request may close this issue.

2 participants