Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialization Error of Unity Rendering in RL Applications #207

Open
AkgunOnur opened this issue May 17, 2024 · 0 comments
Open

Initialization Error of Unity Rendering in RL Applications #207

AkgunOnur opened this issue May 17, 2024 · 0 comments

Comments

@AkgunOnur
Copy link

Hey guys,

I hope you are doing great!

I have completed the installation process for Flightmare, and everything works fine except for the rendering. When I run the RPG_Flightmare in one terminal and execute the following command in another terminal:

python3 run_drone_control.py --train 0 --render 1

I receive plot output showing the position, velocity, angle, etc. However, I also encounter a warning:

[VecEnv]       Flightmare Unity Bridge is not initialized.

Despite this warning, I am able to run the racing application in Gazebo using the following command without any issues:

roslaunch flightros racing.launch

In an attempt to integrate Unity rendering with the quadrotor environment for reinforcement learning applications, I added the following code to connect to Unity in the constructor of the environment:

unity_ready = unity_bridge_ptr->connectUnity(scene_id);

Additionally, in the step function, I included the following commands to render the Unity simulator:

unity_bridge_ptr->getRender(frame_id);
unity_bridge_ptr->handleOutput();
frame_id += 1;

However, when running the modified code, I encounter a segmentation fault, indicating that the integration didn't work as expected.

I would appreciate any suggestions or guidance on how to properly integrate Unity rendering with the quadrotor environment for reinforcement learning applications. I have attached the relevant code files, including the quadrotor environment code and the Unity bridge implementation, to provide more context.

If you require any additional information or have any specific questions, please let me know.

Thank you in advance for your assistance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant