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

[Question] rl_zoo3 optimization pipeline for ros-based custom env #410

Closed
5 tasks done
ammar-n-abbas opened this issue Oct 19, 2023 · 2 comments
Closed
5 tasks done
Labels
more information needed Please fill the issue template completely question Further information is requested

Comments

@ammar-n-abbas
Copy link

❓ Question

Hello,

I am trying to perform hyperparameter tuning on a ROS-based custom env. It works fine for training and loading the trained agent, however, for optimization case I get some communication errors with ROS services and parameter space.

Does anyone have an idea of possible problem related to this?

cmd:
python -m rl_zoo3.train --algo tqc --env UR5PickAndPlaceEnv-v0 -optimize

Thanks

Checklist

@ammar-n-abbas ammar-n-abbas added the question Further information is requested label Oct 19, 2023
@ammar-n-abbas ammar-n-abbas changed the title [Question] rl_zoo3 optimization pipeline for ros based custome environments [Question] rl_zoo3 optimization pipeline for ros based custom environments Oct 19, 2023
@ammar-n-abbas ammar-n-abbas changed the title [Question] rl_zoo3 optimization pipeline for ros based custom environments [Question] rl_zoo3 optimization pipeline for ros-based custom env Oct 19, 2023
@araffin araffin added the more information needed Please fill the issue template completely label Oct 19, 2023
@ammar-n-abbas
Copy link
Author

ammar-n-abbas commented Oct 19, 2023

I found a possible problem:

In the training pipeline at setup_experiment method why is

env.close()

called when the optimization param is True?

When I uncomment it, it runs, however, does not optimize.

if self.continue_training:  
     model = self._load_pretrained_agent(self._hyperparams, env)  
elif self.optimize_hyperparameters:  
    env.close()  
    return None  

@ammar-n-abbas
Copy link
Author

ammar-n-abbas commented Oct 19, 2023

According to the openai_ros interface, when env.close() is invoked, it also shutdowns the ros signals and calls

rospy.signal_shutdown

Therefore, it drops the communication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more information needed Please fill the issue template completely question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants