How to use "openai_ros" for ROS melodic's robot in Python 3 environment?

asked 2022-02-13 05:42:26 -0500

kankanzheli gravatar image

updated 2022-02-13 08:02:15 -0500

Hello everyone. I created a robot in gazebo under "ROS melodic (py2)". At this stage, it is planned to use reinforcement learning tools on this robot. Fortunately, I learned about the reinforcement learning tool "openai_ros".

But what I learned from the Internet is that "openai_ros" needs to be in Python 2 7 environment. These tools also require Python 2 7 corresponding tensorflow

This has brought me great difficulties. The graphics card I use is rtx3070 So it can be used in python2 Pytorch and tensorflow of 7 don't correspond to my CUDA version at all.

So my idea is whether we can carry out reinforcement learning for robots in gazebo in the virtual environment of Python 3? How to use "openai_ros" in Python 3 environment?

Note that my robot was created under "ROS melodic", so I can't use this method: upgrade to "ROS noetic" and use "openai_ros"

Also, can we use Python 3 to perform "openai_ros" reinforcement learning in this way?

I looked at the relevant code roughly. I found that "robot_envs" and "task_envs" were built in the environment of "openai_ros" However, the relevant code to start the training is located in "openai_examples_projects" So can the algorithm of reinforcement learning of gazebo robot be realized under python3 by installing the code in "openai_examples_projects" in the format of PY3?

edit retag flag offensive close merge delete

Comments

When you start a problem with these many constraints, the solutions will be limited and not easy to implement.

Since there are working solutions for running with OpenAi in ROS Noetic upgrading your robot to ROS Noetic might be the easier path. What robot are you dealing with?

I worked on some old robots using old ROS distros, see my repo: https://github.com/robogeekcanada/noe... to give you ideas

osilva gravatar image osilva  ( 2022-02-13 07:08:47 -0500 )edit

I know what you think. But because the robot was completely developed by my research laboratory. And the structure is complex. Therefore, upgrading to "ROS noetic" requires too much work.

As for my request, it is also very simple. It is to perform reinforcement learning on the gazebo robot of ROS melodic in the python 3 environment. Of course, it is best to use the package of "openai_ros" to realize this function.

kankanzheli gravatar image kankanzheli  ( 2022-02-13 07:17:27 -0500 )edit