I want to get the real time location and categories of objects in the Uworld to train my algorithm,but I don't know how to get the information.Is there a function to acquire it?
Hi @Super-Tree,
Please read the documentation and take a look at the well commented examples that we provide in our repo, like client_example.py.
non_player_agents contains a list with all this information. On the Measurements section of our documentation you will find more information.
Hi @marcgpuig ,
How can I get player_agents's movement orientation that the simulator displayed on lower left?
As follows:
Orientation: (x,y,z)
Hi @zhangfree2018 ,
are you looking for something like this?
measurements.player_measurements.transform.orientation.x
measurements.player_measurements.transform.orientation.y
measurements.player_measurements.transform.orientation.z
It's marked as deprecated, while instead of orientation (Vector3D) the rotation (Rotation3D, pitch/roll/yaw) should be used. You can simply print it to the screen/console (like in client_example.py) or dump it to a .txt file:
message = 'Orientation: ({rot_x:.1f}, {rot_y:.1f}, {rot_z:.1f})'
message = message.format(
rot_x=measurements.player_measurements.transform.orientation.x,
rot_y=measurements.player_measurements.transform.orientation.y,
rot_z=measurements.player_measurements.transform.orientation.z)
with open("_out/orientation.txt", "a") as text_file:
text_file.write(message)
text_file.close()
I do this inside the print_measurements() function of the client_example.py. I hope this is helping you.
Hi @p-schulz ,
Thanks for your help! I have got orientation by your explanation.
Most helpful comment
Hi @zhangfree2018 ,
are you looking for something like this?
It's marked as deprecated, while instead of orientation (Vector3D) the rotation (Rotation3D, pitch/roll/yaw) should be used. You can simply print it to the screen/console (like in client_example.py) or dump it to a .txt file:
I do this inside the print_measurements() function of the client_example.py. I hope this is helping you.