forked from uzh-rpg/flightmare
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pybind works, fixed error in cmakelist
- Loading branch information
Showing
22 changed files
with
210 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ dist | |
*.egg-info | ||
*.so | ||
__pycache__ | ||
build | ||
saved |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
import numpy as np | ||
|
||
from flightgym import TestEnv_v0 | ||
from flightgym import QuadrotorEnv_v0 | ||
from flightgym import QuadrotorEnv_v1 | ||
|
||
def main(): | ||
test_env = TestEnv_v0() | ||
quad_env0 = QuadrotorEnv_v0() | ||
# quad_env0 = QuadrotorEnv_v0() | ||
obs = np.zeros(shape=(3, 3), dtype=np.float32) | ||
test_env.reset(obs) | ||
print(obs) | ||
|
||
quad_env1 = QuadrotorEnv_v1() | ||
obs = np.zeros(shape=(1, 9), dtype=np.float32) | ||
quad_env1.reset(obs) | ||
print(obs) | ||
|
||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#include "flightlib/envs/vec_env.hpp" | ||
#include "flightlib/envs/quadrotor_env/quadrotor_env.hpp" | ||
|
||
#include <gtest/gtest.h> | ||
#include <yaml-cpp/yaml.h> | ||
#include <fstream> | ||
#include <iostream> | ||
|
||
using namespace flightlib; | ||
|
||
TEST(VecEnv, Constructor) { | ||
std::string config_path = | ||
getenv("FLIGHTMARE_PATH") + | ||
std::string("/flightlib/configs/quadrotor_env.yaml"); | ||
|
||
Logger logger("VecEnv TEST"); | ||
logger.info("Environment configuration path \"%s\".", config_path.c_str()); | ||
|
||
VecEnv<QuadrotorEnv> env(config_path); | ||
|
||
env.setSeed(10); | ||
|
||
int obs_dim = env.getObsDim(); | ||
std::cout << "obs_dim : " << obs_dim << std::endl; | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.