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

TypeError: __init__() got an unexpected keyword argument 'actor_class' #4

Open
ammar-n-abbas opened this issue Aug 15, 2023 · 8 comments

Comments

@ammar-n-abbas
Copy link

Hi,

while running the training files through rosrun as defined in the readme, I am getting this error:

  **File "~/catkin_ws/src/ur_openai_gym/ur_rl/scripts/tf2rl_sac.py", line 83, in <module>**
    policy = SAC(
  File "~.local/lib/python3.8/site-packages/tf2rl/algos/sac.py", line 50, in __init__
    super().__init__(
  File "~/.local/lib/python3.8/site-packages/tf2rl/algos/policy_base.py", line 86, in __init__
    super().__init__(memory_capacity=memory_capacity, **kwargs)
**TypeError: __init__() got an unexpected keyword argument 'actor_class'**

@cambel
Copy link
Owner

cambel commented Aug 18, 2023

Hi,

Are you using the docker version or did you install it from source?

In any case, the problem seems to be the version of the tf2rl library.
Make sure you are using this version https://github.com/cambel/tf2rl/tree/dev (the dev branch)

@ammar-n-abbas
Copy link
Author

ammar-n-abbas commented Aug 22, 2023

@cambel thank you for your reply. The issue is resolved with your branch

However, now it shows this error:

'''
GYM Environment:simulation/task_space.yaml
Grasping pluging can't be loaded
ft_sensor: False, ee_link: tool0,
robot_urdf: ur3e
[ WARN] [1692696708.704822850]: link 'robotiq_coupler' material 'flat_black' undefined.
[ WARN] [1692696708.704878883]: link 'robotiq_coupler' material 'flat_black' undefined.
[ WARN] [1692696708.713430526]: link 'robotiq_coupler' material 'flat_black' undefined.
[ WARN] [1692696708.713589309]: link 'robotiq_coupler' material 'flat_black' undefined.
connecting to: /scaled_pos_joint_traj_controller/command
ACTION SPACES TYPE Box(6,)
OBSERVATION SPACES TYPE Box(12,)
Segmentation fault (core dumped)
'''

@cambel
Copy link
Owner

cambel commented Aug 23, 2023

That may be a problem with the python cpprb library. Please re-install the library to this specific version
pip install cpprb==10.0.0

@ammar-n-abbas
Copy link
Author

@cambel thanks a lot this error is resolved now.

Getting this attribute error

AttributeError: module 'ur_control.transformations' has no attribute 'pose_from_angular_veloticy'

@cambel
Copy link
Owner

cambel commented Sep 20, 2023

@ammar-n-abbas
Sorry about that, I don't have time right now to fix the issues with this repo. But I have a hopefully working example here.
It is self-contained so you shouldn't have the error from above that just means incompatibility with a dependency.

@ammar-n-abbas
Copy link
Author

@cambel you are right, it was due to tensorflow and tensorflow_probability compatibility issues it's working fine now.

Thanks

Thank you for sharing another work example, really interesting...

@cambel
Copy link
Owner

cambel commented Sep 20, 2023

glad it works for you now

@pvela2017
Copy link

what version of tensorflow and tensorflow_probabilty are you using? I have the same problem

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

3 participants