wil3 / gymfc Goto Github PK
View Code? Open in Web Editor NEWA universal flight control tuning framework
Home Page: http://wfk.io/neuroflight/
License: MIT License
A universal flight control tuning framework
Home Page: http://wfk.io/neuroflight/
License: MIT License
Dart 6.7.0 from source
Gazebo 10 installed following commands in docker as example
Building GymFC. I'm getting some errors at this step
a. I git clone the gymfc repository (have tried in several folders, e.g. "usr", "home".. to see if that was the error)
In this example gymfc repository is cloned in /home folder
-Have tried both with and without the virtual environment python3 -m venv env
b. I then pip3 install -e . inside the gymfc repository (/home/gymfc folder, tried doing pip3 install . too)
Everything seems fine, proceed to next step:
c. I get into gymfc/envs/assets/gazebo/plugins/ and run build_plugin.sh file by
./build_plugin.sh
and then I get the awful CMake Error
Seems like gymfc isnt able to connect to gazebo or even find it.
My gazebo route seems to be ~/.local/share/Trash/files/gazebo/build/gazebo$ in my latest try
when i executive pip2 install . I get an error:Failed to compile Gazebo plugin. How can I solve it.
My system is ubuntu18.04
Hello,
I have given up on trying for Gazebo to work on Win10.
On Ubuntu, I had no problems what so ever.
I was able to run your test script and got the referent result.
I will probably use Gazebo in headless mode 99% of the time, it would still be nice to be able to make some videos of the simulations.
How can I visualize the simulation?
I've tried with changing the line
p = subprocess.Popen(["gzserver", "--verbose", target_world], shell=False)
to
p = subprocess.Popen(["gzclient", "--verbose", target_world], shell=False)
but just got a bunch of:
Exception occured connecting to Gazebo retrying .... [Errno 111] Connect call failed ('127.0.0.1', 11345)
Do you have any suggestion?
Hi @wil3 you will include other types of RL controllers like PPO/TRPO?
Thanks
I want to get the state updates 10 times per second rather than 1000. So can we reduce the update rate?
At the moment if the digital twin model does not have the plugins built, we can not communicate them them thus we get the following error,
Timeout communicating with flight control plugin.
It would be helpful if the error message included a message reminding the user to check to make sure the plugin is built, or better yet do the check automatically.
I'm using a brand new computer with 18.04 installed (ubuntu, GNOME desktop)
Tested if my system is able to run dockers, and it seems so.
xabi@xabi:~$ sudo docker run hello-world
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
Now I downloaded the gymfc git and run dockerfile, after modifying the line:
ENV USER=gymfc to ENV USER=xabi (my current username, maybe not needed)
Some red lines appear, but overall docker gets built after finishing 23 steps
Step 23/23 : ENTRYPOINT ["/bin/bash", "-c"]
---> Running in 13ea96072021
Removing intermediate container 13ea96072021
---> 2d3428917169
Successfully built 2d3428917169
Successfully tagged gymfc:demo
How can I run the docker and test it with the test_axis or other scripts now? I'm not used to run dockers and dont know where to locate it.
Thanks!
Motor mapping is different between the NN output and the Gazebo environment. To make transfer to hardware easiest NN mapping should match the target hardware. In the future this should be configurable. Since we are doing the translation already for the control signals, we need to remap the motor velocities received from the ESC sensor.
Hi,I have installed the gazebo9.There are some problem when i run the example "python3 -m gymfc.controllers.iris_pid_eval --env-id=AttFC_GyroErr-MotorVel_M4_Ep-v0
",
I got error:Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/fc/gymfc/gymfc/controllers/iris_pid_eval.py", line 180, in <module> main(args.env_id, args.seed) File "/home/fc/gymfc/gymfc/controllers/iris_pid_eval.py", line 163, in main env = gym.make(env_id) File "/home/fc/gym/gym/envs/registration.py", line 167, in make return registry.make(id) File "/home/fc/gym/gym/envs/registration.py", line 119, in make env = spec.make() File "/home/fc/gym/gym/envs/registration.py", line 86, in make env = cls(**self._kwargs) File "/home/fc/gymfc/gymfc/envs/attitude_control_env.py", line 67, in __init__ super(GyroErrorESCVelocityFeedbackEnv, self).__init__(motor_count = motor_count, world=world) File "/home/fc/gymfc/gymfc/envs/gazebo_env.py", line 124, in __init__ self.gz_port = self._get_open_port(self.GZ_START_PORT) File "/home/fc/gymfc/gymfc/envs/gazebo_env.py", line 266, in _get_open_port open_ports.append(c.laddr.port) AttributeError: 'tuple' object has no attribute 'port'
Hi,I want to change the simulation time from 1s to 10s,how can I get it?
There is a bug in the link markdown needing fixing and a multi-line docker command that needs to be shortened.
Following the Gazebo compile from source documentation, it recommends installing to /home/$USER/local
. Although the fc environment allows for the user to provide their own gymfc.ini file, to reduce the need to additional configurations allow this parameter to include environment variables. This also reduces version control complications of the user needing to change the default. Thus the new default should be $HOME/local/share/gazebo/setup.sh
.
The current docker file, tested for OSX, supports the Gazebo front end. However to do this requires the Mesa library which takes a considerably long time to build. For training a controller there is no need to include these libraries.
Create a base image for headless use and then derive a second image with a front end.
Add contribution document to provide guidelines for submitting PRs.
If gymfc is installed with the pip verbose flag, i.e., pip3 install . --verbose
the output of the plugins will be provided. However if Gazebo is not installed and the plugin build fails pip still reports the build was a success.
I am attempting build the plugin using the build_plugin.sh script. I get a Boost error:
/usr/include/boost/math/constants/constants.hpp:343:3: note: use -std=gnu++11 or -fext-numeric-literals to enable more built-in suffixes
/usr/include/boost/math/constants/constants.hpp: In static member function 'static constexpr T boost::math::constants::detail::constant_root_two_div_pi<T>::get(const mpl_::int_<5>&)':
/usr/include/boost/math/constants/constants.hpp:344:3: error: unable to find numeric literal operator 'operator""Q'
I tried both of the suggested flags -std=gnu++11
and fext-numeric-literals
. Neither of the flags change the error received. I also tried -DBOOST_MATH_DISABLE_FLOAT128
based on similar issues for other packages, but received the error:
c++: fatal error: no input files
compilation terminated.
/bin/sh: 1: -std=c++11: not found
I was able to follow all of the other steps in the installation process without any problems, including building DART v6,7 and Gazebo 10 from source.
Some parameters:
Running in Docker container
Ubuntu 16.04
Boost version 1.58
g++/gcc version 6.50
I am using a mac: OSX version 10.13.2 and I'm trying to install gymfc. I followed the install instructions, and brew installed Gazebo and Ogre. I am doing this in an anaconda3 environment with python3.5.
When I entered the command: sudo python3 -m gymfc.controllers.iris_pid_eval --env-id=AttFC_GyroErr-MotorVel_M4_Ep-v0
I got this error:
Exception occured connecting to Gazebo retrying .... [Errno 61] Connect call failed ('127.0.0.1', 11345)
Gazebo multi-robot simulator, version 8.6.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 10.113.38.81
[Err] [RenderEngine.cc:663] EXCEPTION: unable to find OpenGL rendering system. OGRE is probably installed incorrectly. Double check the OGRE cmake output, and make sure OpenGL is enabled.
[Err] [RenderingIface.cc:38] Failed to load the Rendering engine subsystem
unable to find OpenGL rendering system. OGRE is probably installed incorrectly. Double check the OGRE cmake output, and make sure OpenGL is enabled.
[Err] [gazebo.cc:87] Unable to load sensors
[Err] [Server.cc:298] Unable to load gazebo
libc++abi.dylib: Pure virtual function called!
Exception occured connecting to Gazebo retrying .... [Errno 61] Connect call failed ('127.0.0.1', 11345)
Exception occured connecting to Gazebo retrying .... [Errno 61] Connect call failed ('127.0.0.1', 11345)
Exception occured connecting to Gazebo retrying .... [Errno 61] Connect call failed ('127.0.0.1', 11345)
Exception occured connecting to Gazebo retrying .... [Errno 61] Connect call failed ('127.0.0.1', 11345)
Traceback (most recent call last):
File "/Users/nameerhirschkind/PycharmProjects/drone/gymfc/gymfc/envs/gazebo_env.py", line 287, in _connect
self.manager = await pygazebo.connect((self.host, self.gz_port))
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/futures.py", line 381, in __iter__
yield self # This tells Task to wait for completion.
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
future.result()
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/futures.py", line 294, in result
raise self._exception
File "/Users/nameerhirschkind/PycharmProjects/drone/gymfc/gymfc/pygazebo/pygazebo.py", line 562, in handle_connect
future.result()
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/futures.py", line 294, in result
raise self._exception
File "/Users/nameerhirschkind/PycharmProjects/drone/gymfc/gymfc/pygazebo/pygazebo.py", line 252, in callback_impl
future.result() # check for exception
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/futures.py", line 294, in result
raise self._exception
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/tasks.py", line 242, in _step
result = coro.throw(exc)
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/selector_events.py", line 451, in sock_connect
return (yield from fut)
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/futures.py", line 381, in __iter__
yield self # This tells Task to wait for completion.
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/tasks.py", line 310, in _wakeup
future.result()
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/futures.py", line 294, in result
raise self._exception
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/selector_events.py", line 481, in _sock_connect_cb
raise OSError(err, 'Connect call failed %s' % (address,))
ConnectionRefusedError: [Errno 61] Connect call failed ('127.0.0.1', 11345)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/nameerhirschkind/PycharmProjects/drone/gymfc/gymfc/controllers/iris_pid_eval.py", line 180, in <module>
main(args.env_id, args.seed)
File "/Users/nameerhirschkind/PycharmProjects/drone/gymfc/gymfc/controllers/iris_pid_eval.py", line 163, in main
env = gym.make(env_id)
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/site-packages/gym/envs/registration.py", line 167, in make
return registry.make(id)
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/site-packages/gym/envs/registration.py", line 119, in make
env = spec.make()
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/site-packages/gym/envs/registration.py", line 86, in make
env = cls(**self._kwargs)
File "/Users/nameerhirschkind/PycharmProjects/drone/gymfc/gymfc/envs/attitude_control_env.py", line 67, in __init__
super(GyroErrorESCVelocityFeedbackEnv, self).__init__(motor_count = motor_count, world=world)
File "/Users/nameerhirschkind/PycharmProjects/drone/gymfc/gymfc/envs/gazebo_env.py", line 145, in __init__
self._start_sim()
File "/Users/nameerhirschkind/PycharmProjects/drone/gymfc/gymfc/envs/gazebo_env.py", line 240, in _start_sim
self.loop.run_until_complete(self._connect())
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/base_events.py", line 467, in run_until_complete
return future.result()
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/futures.py", line 294, in result
raise self._exception
File "/Users/nameerhirschkind/anaconda3/envs/machine-learning/lib/python3.5/asyncio/tasks.py", line 240, in _step
result = coro.send(None)
File "/Users/nameerhirschkind/PycharmProjects/drone/gymfc/gymfc/envs/gazebo_env.py", line 293, in _connect
if not self.manager:
AttributeError: 'GyroErrorESCVelocityFeedbackEnv' object has no attribute 'manager'
Any idea on how to fix this?
Thanks in advance!
I got error when using protobuf 3.9.1:
/usr/include/ignition/msgs1/ignition/msgs/material.pb.h: In member function ‘const string& ignition::msgs::Material::normal_map() const’:
/usr/include/ignition/msgs1/ignition/msgs/material.pb.h:662:93: error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::GetNoArena(const string*) const’
return normal_map_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
also error when using 3.5.1:
error: no matching function for call to ‘google::protobuf::internal::ArenaStringPtr::GetNoArena(const string*) const’
I am running the following command inside a venv: python tests/test_start_sim.py gymfc/envs/assets/gazebo/models/attitude_control_training_rig/model.sdf
I have the plugins in the correct directory but I'm getting the following error.
Traceback (most recent call last):
File "tests/test_start_sim.py", line 32, in
env = Sim(args.aircraftconfig, args.gymfc_config, args.verbose)
File "tests/test_start_sim.py", line 10, in init
super().init(aircraft_config, config_filepath=config, verbose=verbose)
File "/home/baktha/baktha/repos/AI_Sim/gymfc/gymfc/envs/fc_env.py", line 145, in init
self.load_config(aircraft_config, config_filepath = config_filepath)
File "/home/baktha/baktha/repos/AI_Sim/gymfc/gymfc/envs/fc_env.py", line 235, in load_config
self._parse_model_sdf()
File "/home/baktha/baktha/repos/AI_Sim/gymfc/gymfc/envs/fc_env.py", line 381, in _parse_model_sdf
raise SystemExit("Could not find plugin with filename {} from SDF file {} required to load the aircraft model.".format("libAircraftConfigPlugin.so", model_sdf))
NameError: name 'model_sdf' is not defined
Any idea on how to solve it?
Hi,
This problem occurs while commanding cmake ../
in build_plugin.sh.
My gazebo version is 9.11
Summary
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Simbody_LIBRARIES (ADVANCED)
linked by target "FlightControllerPlugin" in directory /Users/USERNAME/project/gymfc/gymfc/envs/assets/gazebo/plugins
linked by target "AircraftConfigPlugin" in directory /Users/USERNAME/project/gymfc/gymfc/envs/assets/gazebo/plugins
Full version
-- The C compiler identification is AppleClang 11.0.0.11000033
-- The CXX compiler identification is AppleClang 11.0.0.11000033
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2")
-- Checking for module 'bullet>=2.82'
-- Found bullet, version 2.88
CMake Warning (dev) at /usr/local/lib/cmake/simbody/SimbodyConfig.cmake:121 (if):
if given arguments:
"TRUE"
An argument named "TRUE" appears in a conditional statement. Policy
CMP0012 is not set: if() recognizes numbers and boolean constants. Run
"cmake --help-policy CMP0012" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
/usr/local/lib/cmake/gazebo/gazebo-config.cmake:118 (find_package)
CMakeLists.txt:4 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found fcl: /usr/local/Cellar/fcl/0.5.0_1/include (found suitable version "0.5.0", minimum required is "0.3.2")
-- Found assimp: /usr/local/include (found version "5.0.0")
CMake Warning at /usr/local/lib/cmake/boost_regex-1.71.0/libboost_regex-variant-shared.cmake:59 (message):
Target Boost::regex already has an imported location
'/usr/local/lib/libboost_regex-mt.dylib', which will be overwritten with
'/usr/local/lib/libboost_regex.dylib'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_regex-1.71.0/boost_regex-config.cmake:43 (include)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
/usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/FindBoost.cmake:443 (find_package)
/usr/local/share/dart/cmake/DARTFindBoost.cmake:24 (find_package)
/usr/local/share/dart/cmake/dart_dartComponent.cmake:6 (include)
/usr/local/share/dart/cmake/DARTConfig.cmake:63 (include)
/usr/local/share/dart/cmake/DARTConfig.cmake:123 (dart_traverse_components)
/usr/local/share/dart/cmake/DARTConfig.cmake:171 (dart_package_init)
/usr/local/lib/cmake/gazebo/gazebo-config.cmake:124 (find_package)
CMakeLists.txt:4 (find_package)
CMake Warning at /usr/local/lib/cmake/boost_system-1.71.0/libboost_system-variant-shared.cmake:59 (message):
Target Boost::system already has an imported location
'/usr/local/lib/libboost_system-mt.dylib', which will be overwritten with
'/usr/local/lib/libboost_system.dylib'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_system-1.71.0/boost_system-config.cmake:43 (include)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
/usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/FindBoost.cmake:443 (find_package)
/usr/local/share/dart/cmake/DARTFindBoost.cmake:24 (find_package)
/usr/local/share/dart/cmake/dart_dartComponent.cmake:6 (include)
/usr/local/share/dart/cmake/DARTConfig.cmake:63 (include)
/usr/local/share/dart/cmake/DARTConfig.cmake:123 (dart_traverse_components)
/usr/local/share/dart/cmake/DARTConfig.cmake:171 (dart_package_init)
/usr/local/lib/cmake/gazebo/gazebo-config.cmake:124 (find_package)
CMakeLists.txt:4 (find_package)
CMake Warning at /usr/local/lib/cmake/boost_filesystem-1.71.0/libboost_filesystem-variant-shared.cmake:59 (message):
Target Boost::filesystem already has an imported location
'/usr/local/lib/libboost_filesystem-mt.dylib', which will be overwritten
with '/usr/local/lib/libboost_filesystem.dylib'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_filesystem-1.71.0/boost_filesystem-config.cmake:43 (include)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
/usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/FindBoost.cmake:443 (find_package)
/usr/local/share/dart/cmake/DARTFindBoost.cmake:24 (find_package)
/usr/local/share/dart/cmake/dart_dartComponent.cmake:6 (include)
/usr/local/share/dart/cmake/DARTConfig.cmake:63 (include)
/usr/local/share/dart/cmake/DARTConfig.cmake:123 (dart_traverse_components)
/usr/local/share/dart/cmake/DARTConfig.cmake:171 (dart_package_init)
/usr/local/lib/cmake/gazebo/gazebo-config.cmake:124 (find_package)
CMakeLists.txt:4 (find_package)
-- Found DART: /usr/local/include (Required is at least version "6") found components: dart
CMake Warning at /usr/local/lib/cmake/boost_program_options-1.71.0/libboost_program_options-variant-shared.cmake:59 (message):
Target Boost::program_options already has an imported location
'/usr/local/lib/libboost_program_options-mt.dylib', which will be
overwritten with '/usr/local/lib/libboost_program_options.dylib'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_program_options-1.71.0/boost_program_options-config.cmake:43 (include)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
/usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/FindBoost.cmake:443 (find_package)
/usr/local/lib/cmake/gazebo/gazebo-config.cmake:159 (find_package)
CMakeLists.txt:4 (find_package)
CMake Warning at /usr/local/lib/cmake/boost_iostreams-1.71.0/libboost_iostreams-variant-shared.cmake:59 (message):
Target Boost::iostreams already has an imported location
'/usr/local/lib/libboost_iostreams-mt.dylib', which will be overwritten
with '/usr/local/lib/libboost_iostreams.dylib'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_iostreams-1.71.0/boost_iostreams-config.cmake:43 (include)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
/usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/FindBoost.cmake:443 (find_package)
/usr/local/lib/cmake/gazebo/gazebo-config.cmake:159 (find_package)
CMakeLists.txt:4 (find_package)
CMake Warning at /usr/local/lib/cmake/boost_date_time-1.71.0/libboost_date_time-variant-shared.cmake:59 (message):
Target Boost::date_time already has an imported location
'/usr/local/lib/libboost_date_time-mt.dylib', which will be overwritten
with '/usr/local/lib/libboost_date_time.dylib'
Call Stack (most recent call first):
/usr/local/lib/cmake/boost_date_time-1.71.0/boost_date_time-config.cmake:43 (include)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:117 (find_package)
/usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake:182 (boost_find_component)
/usr/local/Cellar/cmake/3.15.5/share/cmake/Modules/FindBoost.cmake:443 (find_package)
/usr/local/lib/cmake/gazebo/gazebo-config.cmake:159 (find_package)
CMakeLists.txt:4 (find_package)
-- Found Boost: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found suitable version "1.71.0", minimum required is "1.40.0") found components: thread system filesystem program_options regex iostreams date_time
-- Found Protobuf: /usr/local/lib/libprotobuf.dylib (found version "3.10.0")
-- Found Boost: /usr/local/lib/cmake/Boost-1.71.0/BoostConfig.cmake (found version "1.71.0")
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Checking for module 'OGRE'
-- Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreMain.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreMain.dylib
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgrePaging.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgrePaging.dylib
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreTerrain.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreTerrain.dylib
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreProperty.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreProperty.dylib
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreRTShaderSystem.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreRTShaderSystem.dylib
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreVolume.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreVolume.dylib
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreOverlay.dylib;debug;/usr/local/Cellar/ogre1.9/1.9-20160714-108ab0bcc69603dba32c0ffd4bbbc39051f421c9_8/lib/libOgreOverlay.dylib
-- Found Protobuf: /usr/local/lib/libprotobuf.dylib (found suitable version "3.10.0", minimum required is "2.3.0")
-- Checking for module 'uuid'
-- Found uuid, version 1.6.2
-- Found UUID: TRUE
-- Checking for module 'tinyxml2'
-- Found tinyxml2, version 7.1.0
-- Looking for dlfcn.h - found
-- Looking for libdl - found
-- Found DL: TRUE
-- FreeImage.pc not found, we will search for FreeImage_INCLUDE_DIRS and FreeImage_LIBRARIES
-- Found UUID: TRUE
-- Checking for module 'gts'
-- Found gts, version 0.7.6
-- Found GTS: TRUE
-- Checking for module 'libswscale'
-- Found libswscale, version 5.5.100
-- Found SWSCALE: TRUE
-- Checking for module 'libavdevice >= 56.4.100'
-- Found libavdevice , version 58.8.100
-- Found AVDEVICE: TRUE (Required is at least version "56.4.100")
-- Checking for module 'libavformat'
-- Found libavformat, version 58.29.100
-- Found AVFORMAT: TRUE
-- Checking for module 'libavcodec'
-- Found libavcodec, version 58.54.100
-- Found AVCODEC: TRUE
-- Checking for module 'libavutil'
-- Found libavutil, version 56.31.100
-- Found AVUTIL: TRUE
-- Found CURL: /usr/lib/libcurl.dylib (found version "7.64.1")
-- Checking for module 'jsoncpp'
-- Found jsoncpp, version 1.9.0
-- Found JSONCPP: TRUE
-- Checking for module 'yaml-0.1'
-- Found yaml-0.1, version 0.2.2
-- Found YAML: TRUE
-- Checking for module 'libzip'
-- Found libzip, version 1.5.2
-- Found ZIP: TRUE
-- Found Protobuf: /usr/local/lib/libprotobuf.dylib (found version "3.10.0")
-- Checking for module 'protobuf'
-- Found protobuf, version 3.10.0
Gazebo version: 9.11
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Simbody_LIBRARIES (ADVANCED)
linked by target "FlightControllerPlugin" in directory /Users/USERNAME/project/gymfc/gymfc/envs/assets/gazebo/plugins
linked by target "AircraftConfigPlugin" in directory /Users/USERNAME/project/gymfc/gymfc/envs/assets/gazebo/plugins
-- Configuring incomplete, errors occurred!
See also "/Users/USERNAME/project/gymfc/gymfc/envs/assets/gazebo/plugins/build/CMakeFiles/CMakeOutput.log".
In the world file, the world plugin loads in specific motor model information. We want the environment to be independent of the model however in the Gazebo framework this is difficult to achieve. The world plugin needs reference to the rotors to apply the force from the given control signal. Some options to consider,
Hi,when I run the PID example and the PPO, I get different expectations.How can I make them expect the same value?
Hi, thank you for your inspiring work.
I try to install gymfc with "sudo pip3 install -e".
But I came across some errors:
" Could not find a version that satisfies the requirement pygazebo (from gymfc==0.0.1) (from versions: 2.2.1-2014.1, 2.2.1-2014.2, 3.0.0-2014.1)
No matching distribution found for pygazebo (from gymfc==0.0.1)"
I checked the gazebo version with "dpkg -l | grep gazebo":
"ii gazebo7-common 7.8.1-1xenial all Open Source Robotics Simulator - Shared filesxenial amd64 Open Source Robotics Simulator
ii gazebo8 8.1.1-1
ii gazebo8-common 8.1.1-1xenial all Open Source Robotics Simulator - Shared filesxenial amd64 Open Source Robotics Simulator - base plug-ins
ii gazebo8-plugin-base 8.1.1-1
ii libgazebo8:amd64 8.1.1-1xenial amd64 Open Source Robotics Simulator - shared libraryxenial amd64 Open Source Robotics Simulator - Development Files
ii libgazebo8-dev:amd64 8.1.1-1
ii ros-kinetic-gazebo8-msgs 2.5.10-1xenial amd64 Message and service data structures for interacting with Gazebo from ROS.
ii ros-kinetic-gazebo8-ros 2.5.10-1xenial amd64 Provides ROS plugins that offer message and service publishers for interfacing with Gazebo through ROS."
Any clue as to what to I am doing wrong? Thank you again.
Hi,
when I tried to compile the Gazebo plugin, I got this message:
gymfc/gymfc/envs/assets/gazebo/plugins/FlightControllerPlugin.cpp:68:10: fatal error: gazebo/physics/dart/DARTModel.hh: No such file or directory
#include <gazebo/physics/dart/DARTModel.hh>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Looks like it can't find the header file. I have installed the Gazebo 10.2. Could you help me to solve it?
Thanks a lot.
Hello,I want know how you to write this model,do you have some blogs to introduce the gymfc.And when i run the command "python3 -m gymfc.controllers.iris_pid_eval --env-id=AttFC_GyroErr-MotorVel_M4_Ep-v0",I got this error:
Traceback (most recent call last): File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/usr/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/fc/桌面/gymfc-master/gymfc/controllers/iris_pid_eval.py", line 180, in <module> main(args.env_id, args.seed) File "/home/fc/桌面/gymfc-master/gymfc/controllers/iris_pid_eval.py", line 163, in main env = gym.make(env_id) File "/home/fc/gym/gym/envs/registration.py", line 167, in make return registry.make(id) File "/home/fc/gym/gym/envs/registration.py", line 119, in make env = spec.make() File "/home/fc/gym/gym/envs/registration.py", line 85, in make cls = load(self._entry_point) File "/home/fc/gym/gym/envs/registration.py", line 14, in load result = entry_point.load(False) File "/home/fc/gym-duckietown/setuptools-19.6/pkg_resources/__init__.py", line 2370, in load return self.resolve() File "/home/fc/gym-duckietown/setuptools-19.6/pkg_resources/__init__.py", line 2376, in resolve module = __import__(self.module_name, fromlist=['__name__'], level=0) File "/home/fc/桌面/gymfc-master/gymfc/envs/__init__.py", line 1, in <module> from gymfc.envs.attitude_control_env import GyroErrorFeedbackEnv File "/home/fc/桌面/gymfc-master/gymfc/envs/attitude_control_env.py", line 3, in <module> from .gazebo_env import GazeboEnv File "/home/fc/桌面/gymfc-master/gymfc/envs/gazebo_env.py", line 16, in <module> import pygazebo File "/usr/local/lib/python3.5/dist-packages/pygazebo-3.0.0_2014.1-py3.5.egg/pygazebo/__init__.py", line 22, in <module> from pygazebo import connect ImportError: cannot import name 'connect'
Set up badge in README and the check for PRs.
Hi, im dealing some issues with running test environments,
Whenever I try to run test_start_sim.py
(env) cuda@eim-alu-83252:~/projects/gymfc/tests$ python3 test_start_sim.py ~/nf1/model.sdf
I get this error:
Default configuration file at /home/cuda/projects/gymfc/env/lib/python3.6/site-packages/gymfc/envs/../../gymfc.ini missing, aborting
Im using nf1 model from the thesis-work branch
so I went to the source code, and searched for that line, it’s inside the gymfc/envs/fc_env.py file :
so I guess it’s looking for gymfc.ini and not finding it inside current dir
test_start_sim.py is in gymfc/tests/test_start_sim.py, so wont be able to find gymfc.ini as its one directory up in gymfc/gymfc.ini, so Ive tried moving test_start_sim.py to project’s root folder ‘gymfc’ and running from there:
python3 test_start_sim.py ~/nf1/model.sdf
but then I get this new error:
Could not find Gazebo setup.sh file at '/home/$USER/local/share/gazebo-10/setup.sh'. Typo?
So I went there and setup.sh is clearly there, as I had pointed before inside the gymfc.ini file:
Any hints? Must be something trivial but have not been able to find the issue so far
Hi wil3,
I am trying to run this project on Ubuntu 16.04, how to properly set gazebo setup file,
I tried export {} = gymfc/gymfc/envs/assets/gazebo/models/quadcopter_attitude_control on terminal, and source the .bashrc file, but there is nothing happened. Can you help me?
Hello Sir,
Pardon me if i am asking a silly question I have a successfully run your environment with running DDPG algorithm , Luckily I have implemented , But I am unable to Plot graphs Of the episode ,
Please guide me for plotting a graph
Thankyou
Hi Will, I am new to this business and do not quite understand how to compile and install all these programs correctly! I need your help! In the Neuroflight project it was written that first you need to create a model and train in GymFC! So you can explain how all this is done!
Hi Wil,
I have setup your latest gymfc with the nf1 example all is working, However previously we were able to run pi.act(False, ob=ob)[0]
to test the model and do our own custom graphing but with your new baselines repo something has changed can you clarify how to run the recent model manually to test it.
Thanks
Hello.
If I manage to install Gazebo on Windows, would Gym FC work on Windows 10?
I am more interested in your work. After reading your paper, I found your code here. One of my confusion is how do you specifically implement the reward function in your code? Could you please give me a hint. thank you very much!
Hi william,
I am trying to run this project (gymfc v0.1.0) on Ubuntu 18.04 with gazebo 9。I use baseline's PPO1 algorithm to train the controller, just like the example you gave me.
https://gist.github.com/wil3/4115a31c527afd4a7f8ecfab88fa4a24
However, after 15 million steps, the EpRewMean seems does not converge, although it's much higher than its initial value. Because I load the trained graph and find the performance of the controller does not meet the criteria in your paper.
I use the gazebo 9 attached to ROS, using the code you provided(run_gymfc.py), please tell me where the problem is, thank you.
Can I setup this repository for working with Ros Kinetic + Gazebo 7 and hectorquadrotor?
Thanks
Hi,
I am trying to run this project. Could you please provide the drone model you used for your manuscript?
Thanks,
Make it easier to install the dependencies using a bash script derived from the travis docker file.
I am attempting to initialize the environment, but I am getting an issue with the attitude_control_training_rig.
I call FlightControlEnv
to initialize the environment, and the gzserver
launches and returns the following error:
[Dbg] [DARTModel.cc:72] Initializing DART model attitude_control_training_rig
[Dbg] [DARTModel.cc:166] Building DART BodyNode for link 'pivot' and joint 'hello_base_joint'.
[Err] [DARTJoint.cc:195] DARTJoint: SetAnchor is not implemented.
Looking at the Gazebo source code, it appears that SetAnchor just doesn't have an implementation, even in the latest version. I was wondering how you got around this issue to load the model.
Hi, I've installed the package in Ubuntu 16.04 with Gazebo8. Every thing is fine with rendering the drone. But when I try to give action to the drone it doesn't move and and gives the following error:
action=np.array([0.2,0.2,0.3,0.3])
env.step(action)
[Wrn] [QuadcopterWorldPlugin.cpp:530] Broken Quadcopter connection, count [0/5]
[Wrn] [QuadcopterWorldPlugin.cpp:530] Broken Quadcopter connection, count [1/5]
[Wrn] [QuadcopterWorldPlugin.cpp:530] Broken Quadcopter connection, count [2/5]
[Wrn] [QuadcopterWorldPlugin.cpp:530] Broken Quadcopter connection, count [3/5]
[Wrn] [QuadcopterWorldPlugin.cpp:530] Broken Quadcopter connection, count [4/5]
[Wrn] [QuadcopterWorldPlugin.cpp:530] Broken Quadcopter connection, count [5/5]
[Wrn] [QuadcopterWorldPlugin.cpp:539] Broken Quadcopter connection, resetting motor control.
Can you please tell me what the problem could be. Thank you
Whenever I run text_axis.py
python3 test_start_sim.py ../modules/digitaltwins/nf1/model.sdf
Gazebo opens with the nf1 in the middle, but shells wont get pass from here:
(env) cuda@eim-alu-83252:~/projects/gymfc/tests$ python3 test_axis.py ~/projects/gymfc/modules/digitaltwins/nf1/model.sdf
Sending motor control signals to port 9527
Gazebo Model Path = /home/cuda/local/share/gazebo-10/models::/home/cuda/projects/gymfc/gymfc/envs/assets/gazebo/models:/home/cuda/projects/gymfc/modules/digitaltwins
Gazebo Plugin Path = /home/cuda/local/lib/gazebo-10/plugins::/home/cuda/projects/gymfc/gymfc/envs/assets/gazebo/plugins/build:/home/cuda/projects/gymfc/modules/digitaltwins/nf1/plugins/build
Starting gzserver with process ID= 3028
Roll Left
-----------------------------------
After 1 minute, this message appears and gazebo ends.
Timeout communicating with flight control plugin.
Simulation Stats
-----------------
steps 0
packets_dropped 0
time_start_seconds 1586362388.8515196
time_lapse_hours 0.016432642539342245
Killing Gazebo process with ID= 3028
Killing Gazebo process with ID= 3029
Timeout communicating with flight control plugin.
Watching the youtube video in your Channel, I see that after all these hyphens, this should appear, but wont get pass from there.
Hi, I'm trying to start testing the PPO algorythm in the thesis-work branch.
Are there any steps on how to get started once GymFC is working? I'm using jupyter notebook, is there any documentation to look for regarding it's OpenAI baselines and how it's related to gymfc?
Thanks
While trying to get the GymFC up and running by running the iris pid example I ran into the following issue:
➜ controllers git:(master) python3 run_iris_pid.py
Loading config from ../configs/iris.config
'tuple' object has no attribute 'port'
In the readme, you mention that the Gazebo SetupFile
needs to be pointing to the correct location. As somebody who has never used Gazebo before it was unclear which file exactly you refer to and what I should put in there.
In the reset-optimization branch, I get a long list of these errors:
[Wrn] [QuadcopterWorldPlugin.cpp:533] Received size -1 less than the expected size of 20
[Err] [QuadcopterWorldPlugin.cpp:384] Command not received t=0
before this line appears and everything seems to be working again:
[Dbg] [QuadcopterWorldPlugin.cpp:558] Quadcopter controller online detected.
Hi @wil3
Silly question but did you consider using Unity ML agents to build the Quad simulator?
Thanks
Hello Sir,
I have installed GYMFc according to Instructions mentioned , I also run example code it shows the graph , but How do i visualize the gazebo simulation ???
I am developing some RL algorithms, and want to compare them to the OpenAI Baselines. As a starting point I want to get PPO2 to work as this was the most successful Baseline in your paper. Is there an easy way to do this?
What I have tried is creating a new Python project installing GymFC and Baselines as dependencies. Baselines has categorized the environments after how they need to interface with them. GymFC uses the "envs" category which is not supported directly by Baselines. So I changed this to "classic_control" which uses a vectorized interface. Training PPO2 using default parameters, "eprewmean" (episode reward mean) does not converge even after 10 million time steps. It fluctuates at around -530 from the beginning of the training until the end. Plotting "omega_actual' and "omega_target" using "gymfc.controllers.iris_pid_eval.plot_step_response" shows the PPO2 controller does not converge to the setpoint at all.
GymFC uses Gazebo 9 (ref. PR #16) which works successfully with the "iris_pid_eval" controller. Is this how GymFC is designed to be used with Baselines?
Trying to setup gymfc on my Ubuntu 18.04. Installed DART 6.7.0 correctly.
Following the steps mentioned in http://gazebosim.org/tutorials?tut=install_from_source&cat=install to install Gazebo 10.2.0, but facing the below error on running the make command.
Running cmake -DCMAKE_BUILD_TYPE=Debug ../
completed successfully, with only some warnings, no errors.
Running the command ls /etc/apt/sources.list.d/ | grep dart
returns:
dartsim-ubuntu-ppa-bionic.list
dartsim-ubuntu-ppa-bionic.list.save
So, i believe my DART has installed successfully. Sorry, Im new to ubuntu, may be making a silly error.
Thanks in advance.
Varun
After successful installation, when I tested the scripts in the /test folder using
python3 test_start_sim.py
or python test_axis.py
, i got the following error:
gzserver: error while loading shared libraries: libdart-collision-bulletd.so.6.7: cannot open shared object file: No such file or directory
On executing the same test scripts using sudo python <filename>
, ran the scripts successfully by loading the twin in Gazebo.
Running using sudo
is a work around, I dont understand the reason for this error. Also, I could not locate this shared library libdart-collision-bulletd
anywhere on the net. (Notice the 'd' after the bullet)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.