RGring / drl_local_planner_ros_stable_baselines

BSD 3-Clause "New" or "Revised" License
133 stars 36 forks source link

Example usage-1.Train ahent #18

Closed Bkarso closed 3 years ago

Bkarso commented 3 years ago

hello , When I tried to python rl_agent/scripts/train_scripts/train_ppo.py

It had error here:

Traceback (most recent call last): File "rl_agent/scripts/train_scripts/train_ppo.py", line 13, in from rl_agent.env_wrapper.ros_env_cont_img import RosEnvContImg File "/home/hantewin/test/src/drl_local_planner_ros_stable_baselines-master/rl_agent/src/rl_agent/env_wrapper/ros_env_cont_img.py", line 19, in from rl_agent.env_wrapper.ros_env_img import RosEnvImg File "/home/hantewin/test/src/drl_local_planner_ros_stable_baselines-master/rl_agent/src/rl_agent/env_wrapper/ros_env_img.py", line 15, in from rl_agent.env_wrapper.ros_env import RosEnvAbs File "/home/hantewin/test/src/drl_local_planner_ros_stable_baselines-master/rl_agent/src/rl_agent/env_wrapper/ros_env.py", line 32, in from rl_agent.env_utils.task_generator import TaskGenerator File "/home/hantewin/test/src/drl_local_planner_ros_stable_baselines-master/rl_agent/src/rl_agent/env_utils/task_generator.py", line 29, in from pedsim_srvs.srv import SpawnPeds ImportError: cannot import name 'SpawnPeds'

Can you help me? please,I don't know how to deal with it , I had chmod 777 als

Bkarso commented 3 years ago

@RGring

RGring commented 3 years ago

Seems that your pedsim is not setup correctly. Did you load the third-party repositories? https://github.com/RGring/drl_local_planner_ros_stable_baselines/blob/master/.rosinstall

Bkarso commented 3 years ago

yes,I downloaded it according to the version

but when I catkin_make the "flatland",I need to comment some code: //Bkarso----------------------------------- //if (target != m_targetA) //comment here,I think that it doesn't matter; { m_bodyB->SetAwake(true); m_targetA = target; } //Bkarso-----------------------------------

And when I run it : python rl_agent/scripts/train_scripts/train_ppo.py ; It had some error : (venv_p3) hantewin@hantewin-System-Product-Name:~/test/src/drl_local_planner_ros_stable_baselines-master$ python rl_agent/scripts/train_scripts/train_ppo.py /home/hantewin/path_to_venv/venv_p3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:526: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint8 = np.dtype([("qint8", np.int8, 1)]) /home/hantewin/path_to_venv/venv_p3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:527: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint8 = np.dtype([("quint8", np.uint8, 1)]) /home/hantewin/path_to_venv/venv_p3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:528: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint16 = np.dtype([("qint16", np.int16, 1)]) /home/hantewin/path_to_venv/venv_p3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:529: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_quint16 = np.dtype([("quint16", np.uint16, 1)]) /home/hantewin/path_to_venv/venv_p3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:530: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. _np_qint32 = np.dtype([("qint32", np.int32, 1)]) /home/hantewin/path_to_venv/venv_p3/lib/python3.5/site-packages/tensorflow/python/framework/dtypes.py:535: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'. np_resource = np.dtype([("resource", np.ubyte, 1)]) Traceback (most recent call last): File "rl_agent/scripts/train_scripts/train_ppo.py", line 22, in from stable_baselines.common.vec_env import VecNormalize, SubprocVecEnv, VecFrameStack File "/home/hantewin/test/src/drl_local_planner_forks/stable-baselines/stable_baselines/init.py", line 1, in from stable_baselines.a2c import A2C File "/home/hantewin/test/src/drl_local_planner_forks/stable-baselines/stable_baselines/a2c/init.py", line 1, in from stable_baselines.a2c.a2c import A2C File "/home/hantewin/test/src/drl_local_planner_forks/stable-baselines/stable_baselines/a2c/a2c.py", line 8, in from stable_baselines import logger File "/home/hantewin/test/src/drl_local_planner_forks/stable-baselines/stable_baselines/logger.py", line 17, in from stable_baselines.common.misc_util import mpi_rank_or_zero File "/home/hantewin/test/src/drl_local_planner_forks/stable-baselines/stable_baselines/common/init.py", line 9, in from stable_baselines.common.cmd_util import make_vec_env File "/home/hantewin/test/src/drl_local_planner_forks/stable-baselines/stable_baselines/common/cmd_util.py", line 13, in from stable_baselines.common.atari_wrappers import make_atari, wrap_deepmind File "/home/hantewin/test/src/drl_local_planner_forks/stable-baselines/stable_baselines/common/atari_wrappers.py", line 6, in import cv2 # pytype:disable=import-error ImportError: /opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so: undefined symbol: PyCObject_Type

Bkarso commented 3 years ago

help me please.thanks. @RGring

Bkarso commented 3 years ago

I also have another download spencer_messages and spencer_tracking_rviz_plugin in pedsim_ros

yani-rl-ai commented 1 year ago

how do you solve your problem?