tudelft / AvoidBench

AvoidBench
MIT License
58 stars 13 forks source link

Cameras Facing Left #1

Closed zyayoung closed 5 months ago

zyayoung commented 1 year ago

Why do we rotate 90 degrees here? I found cameras facing left as a result of the following code. https://github.com/tudelft/AvoidBench/blob/c85581ec3bd7f961f4ad81582900ce6e38d40b87/src/avoidbench/avoidlib/src/bridges/avoidbench_bridge.cpp#L147 Can we just remove *Eigen::AngleAxisd(0.5 * M_PI, Eigen::Vector3d::UnitZ()) to fix this?

zyayoung commented 1 year ago

Removing this solves the problem. But does it affect the testing result, such as incorrect initial yaw angles?

NPU-yuhang commented 1 year ago

Removing this solves the problem. But does it affect the testing result, such as incorrect initial yaw angles?

Hi, I rotate the drone 90 degrees since I have to config the camera in the left side of the drone (the stereo vision always cannot output high quality results if the camera was put in forward side, its also a strange bug from Flightmare). So you'd better do not remove the rotation if you still want to use the stereo camera. This rotation just influence the visualization of the drone in the unity, if there are any other unsuitable effects for your testing, please tell me. Regards, Hang

NPU-yuhang commented 1 year ago

Why do we rotate 90 degrees here? I found cameras facing left as a result of the following code.

https://github.com/tudelft/AvoidBench/blob/c85581ec3bd7f961f4ad81582900ce6e38d40b87/src/avoidbench/avoidlib/src/bridges/avoidbench_bridge.cpp#L147

Can we just remove *Eigen::AngleAxisd(0.5 * M_PI, Eigen::Vector3d::UnitZ()) to fix this?

This line code is used to rotate the drone in Unity, if you still want to remove the rotation, please remove the rotation of camera related to the drone as well: https://github.com/tudelft/AvoidBench/blob/c85581ec3bd7f961f4ad81582900ce6e38d40b87/src/avoidbench/avoidlib/src/bridges/avoidbench_bridge.cpp#L32-L33 https://github.com/tudelft/AvoidBench/blob/c85581ec3bd7f961f4ad81582900ce6e38d40b87/src/avoidbench/avoidlib/src/bridges/avoidbench_bridge.cpp#L46-L47

zyayoung commented 1 year ago

I got it. Thanks for your help and great work! By the way, could you provide code to run the agile autonomy planner (or a guideline)? We may want to test the methods on avoid bench with extra metrics. It will be a great help if you can provide a code for running the planners.

NPU-yuhang commented 1 year ago

Yes, I will update another repo with the changes of agile_autonomy recently.