Closed tongtybj closed 2 years ago
acoording to https://github.com/uzh-rpg/flightmare/blob/092ff357139b2e98fc92bcdee50f38f85b55246d/flightlib/include/flightlib/common/quad_state.hpp#L15-L17
QS::POSX = 0
. So there would be no any trobule in the original coding. Sorry for my misunderstanding.
P.S. for other state such as velocity, we need to use quad_state_.v(0)
instead of quad_state_.v(QS::VELX)
Hi I have the same question. I still don't understand what x represents here and why we use both x and p for position state. Could you explain? Thank you! @tongtybj
x
should denote the all states as defined in following line:
Yes, but why did they use x at some places and p at other places? Are they interchangeable?
bool x_valid = quad_state_.p(QS::POSX) >= world_box_[0] + safty_threshold &&
quad_state_.p(QS::POSX) <= world_box_[1] - safty_threshold;
bool y_valid = quad_state_.p(QS::POSY) >= world_box_[2] + safty_threshold &&
quad_state_.p(QS::POSY) <= world_box_[3] - safty_threshold;
bool z_valid = quad_state_.x(QS::POSZ) >= world_box_[4] + safty_threshold &&
quad_state_.x(QS::POSZ) <= world_box_[5] - safty_threshold;
@yun-long
https://github.com/uzh-rpg/flightmare/blob/092ff357139b2e98fc92bcdee50f38f85b55246d/flightlib/src/envs/vision_env/vision_env.cpp#L345-L348
I wonder that
quad_state_.p(QS::POSX)
is not correct... This should bequad_state_.x(QS::POSX)
orquad_state_.p(0)
.