serl icon indicating copy to clipboard operation
serl copied to clipboard

Data Extraction and Data visualization

Open t1213596901 opened this issue 1 year ago • 7 comments

@charlesxu0124 Hello, dear author. I am a postgraduate and I am a novice in robot and machine learning fields. I have read your paper and code,but I haven't understand them all.Now, I can run the examples in sim environment and save the trajectories.But In the examples, there is not any method about achieve the data Extraction and data visualization offered. Therefore, could you give me some advice or offer some method?

t1213596901 avatar May 08 '24 07:05 t1213596901

hello bro! I am also reproducing SERL, and I have some questions I would like to discuss with you. Can you describe your simulation environment configuration details? I was able to run the simulation before, but after reinstalling the system I got the following error: `(serl) robo@robot:~/work/serl$ python franka_sim/franka_sim/test/test_gym_env_human.py /home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/gym/spaces/box.py:127: UserWarning: WARN: Box bound precision lowered by casting to float32 logger.warn(f"Box bound precision lowered by casting to {self.dtype}") Traceback (most recent call last): File "/home/robo/work/serl/franka_sim/franka_sim/test/test_gym_env_human.py", line 9, in env = envs.PandaPickCubeGymEnv(action_scale=(0.1, 1)) File "/home/robo/work/serl/franka_sim/franka_sim/envs/panda_pick_gym_env.py", line 148, in init self._viewer.render(self.render_mode) File "/home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/gymnasium/envs/mujoco/mujoco_rendering.py", line 706, in render viewer = self._get_viewer(render_mode=render_mode) File "/home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/gymnasium/envs/mujoco/mujoco_rendering.py", line 730, in _get_viewer self.viewer = OffScreenViewer( File "/home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/gymnasium/envs/mujoco/mujoco_rendering.py", line 155, in init super().init(model, data, width, height, max_geom, visual_options) File "/home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/gymnasium/envs/mujoco/mujoco_rendering.py", line 53, in init self.viewport = mujoco.MjrRect(0, 0, width, height) TypeError: init(): incompatible constructor arguments. The following argument types are supported: 1. mujoco._render.MjrRect(left: int, bottom: int, width: int, height: int)

Invoked with: 0, 0, None, None Exception ignored in: <function OffScreenViewer.del at 0x7fbce39b9f30> Traceback (most recent call last): File "/home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/gymnasium/envs/mujoco/mujoco_rendering.py", line 202, in del self.free() File "/home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/gymnasium/envs/mujoco/mujoco_rendering.py", line 199, in free self.opengl_context.free() File "/home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/mujoco/egl/init.py", line 125, in free EGL.eglDestroyContext(EGL_DISPLAY, self._context) File "/home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/OpenGL/platform/baseplatform.py", line 415, in call return self( *args, **named ) File "src/errorchecker.pyx", line 58, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError OpenGL.raw.EGL._errors.EGLError: EGLError( err = EGL_NOT_INITIALIZED, baseOperation = eglDestroyContext, cArguments = ( <OpenGL._opaque.EGLDisplay_pointer object at 0x7fbd1f30a4c0>, <OpenGL._opaque.EGLContext_pointer object at 0x7fbce3b06ac0>, ), result = 0 ) Exception ignored in: <function GLContext.del at 0x7fbd1efc1360> Traceback (most recent call last): File "/home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/mujoco/egl/init.py", line 130, in del self.free() File "/home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/mujoco/egl/init.py", line 125, in free EGL.eglDestroyContext(EGL_DISPLAY, self._context) File "src/errorchecker.pyx", line 58, in OpenGL_accelerate.errorchecker._ErrorChecker.glCheckError OpenGL.raw.EGL._errors.EGLError: EGLError( err = EGL_NOT_INITIALIZED, baseOperation = eglDestroyContext, cArguments = ( <OpenGL._opaque.EGLDisplay_pointer object at 0x7fbd1f30a4c0>, <OpenGL._opaque.EGLContext_pointer object at 0x7fbce3b06ac0>, ), result = 0 ) `

parzivar avatar Nov 12 '24 13:11 parzivar

I haven't met your error,but I think you can adopt this method: conda create -n serl python=3.11(I have tried that 3.11 may more available) pip install --upgrade jax==0.4.25 jaxlib==0.4.25+cuda11.cudnn86 -f https://storage.googleapis.com/jax-releases/jax_cuda_releases.html cd serl_launcher pip install -e . pip install -r requirements.txt

cd ../franka_sim pip install -e . pip install -r requirements.txt Also, you may need install some other library

t1213596901 avatar Nov 13 '24 01:11 t1213596901

ok,thank you a lot. I have solve the problem in simulation. Have you met this error and warning when running: bash run_learner.sh could you tell me your ubuntu and cuda version. Thank you very much for replying me!!! (serl) robo@robot:~/work/serl/examples/async_sac_state_sim$ bash run_learner.sh WARNING:absl:Type handler registry overriding type "<class 'float'>" collision on scalar WARNING:absl:Type handler registry overriding type "<class 'bytes'>" collision on scalar WARNING:absl:Type handler registry overriding type "<class 'numpy.number'>" collision on scalar 2024-11-13 10:36:01.557105: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered WARNING: All log messages before absl::InitializeLog() is called are written to STDERR E0000 00:00:1731465361.573055 68814 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered E0000 00:00:1731465361.577644 68814 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-11-13 10:36:03.592623: W external/xla/xla/service/gpu/nvptx_compiler.cc:760] The NVIDIA driver's CUDA version is 12.5 which is older than the ptxas CUDA version (12.6.77). Because the driver is older than the ptxas version, XLA is disabling parallel compilation, which may slow down compilation. You should update your NVIDIA driver or use the NVIDIA-provided CUDA forward compatibility packages. rlds logger is not installed, install it if required: https://github.com/rail-berkeley/oxe_envlogger /home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/gym/spaces/box.py:127: UserWarning: WARN: Box bound precision lowered by casting to float32 logger.warn(f"Box bound precision lowered by casting to {self.dtype}") I1113 10:36:05.797586 140676277838464 schedule.py:75] A polynomial schedule was set with a non-positive transition_steps value; this results in a constant schedule with value init_value. /home/robo/work/serl/examples/async_sac_state_sim/async_sac_state_sim.py:282: DeprecationWarning: jax.tree_map is deprecated: use jax.tree.map (jax v0.4.25 or newer) or jax.tree_util.tree_map (any JAX version). jax.tree_map(jnp.array, agent), sharding.replicate() shape of observation space and action space Box(-inf, inf, (10,), float32) Box(-1.0, 1.0, (4,), float32) starting learner loop entity: null exp_descriptor: serl_dev_sim_test experiment_id: serl_dev_sim_test_20241113_103609 group: null project: serl_dev tag: serl_dev_sim_test unique_identifier: '20241113_103609'

Filling up replay buffer: 0%|

parzivar avatar Nov 13 '24 02:11 parzivar

ubuntu20.04 cuda11.8

---- Replied Message ---- | From | @.> | | Date | 11/13/2024 10:39 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [rail-berkeley/serl] Data Extraction and Data visualization (Issue #47) |

ok,thank you a lot. I have solve the problem in simulation. Have you met this error and warning when running: bash run_learner.sh could you tell me your ubuntu and cuda version. Thank you very much for replying me!!! (serl) @.***:~/work/serl/examples/async_sac_state_sim$ bash run_learner.sh WARNING:absl:Type handler registry overriding type "<class 'float'>" collision on scalar WARNING:absl:Type handler registry overriding type "<class 'bytes'>" collision on scalar WARNING:absl:Type handler registry overriding type "<class 'numpy.number'>" collision on scalar 2024-11-13 10:36:01.557105: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered WARNING: All log messages before absl::InitializeLog() is called are written to STDERR E0000 00:00:1731465361.573055 68814 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered E0000 00:00:1731465361.577644 68814 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-11-13 10:36:03.592623: W external/xla/xla/service/gpu/nvptx_compiler.cc:760] The NVIDIA driver's CUDA version is 12.5 which is older than the ptxas CUDA version (12.6.77). Because the driver is older than the ptxas version, XLA is disabling parallel compilation, which may slow down compilation. You should update your NVIDIA driver or use the NVIDIA-provided CUDA forward compatibility packages. rlds logger is not installed, install it if required: https://github.com/rail-berkeley/oxe_envlogger /home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/gym/spaces/box.py:127: UserWarning: WARN: Box bound precision lowered by casting to float32 logger.warn(f"Box bound precision lowered by casting to {self.dtype}") I1113 10:36:05.797586 140676277838464 schedule.py:75] A polynomial schedule was set with a non-positive transition_steps value; this results in a constant schedule with value init_value. /home/robo/work/serl/examples/async_sac_state_sim/async_sac_state_sim.py:282: DeprecationWarning: jax.tree_map is deprecated: use jax.tree.map (jax v0.4.25 or newer) or jax.tree_util.tree_map (any JAX version). jax.tree_map(jnp.array, agent), sharding.replicate() shape of observation space and action space Box(-inf, inf, (10,), float32) Box(-1.0, 1.0, (4,), float32) starting learner loop entity: null exp_descriptor: serl_dev_sim_test experiment_id: serl_dev_sim_test_20241113_103609 group: null project: serl_dev tag: serl_dev_sim_test unique_identifier: '20241113_103609'

Filling up replay buffer: 0%|

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

t1213596901 avatar Nov 13 '24 03:11 t1213596901

@parzivar may I know how did you solve the issue?

glitchyordis avatar Dec 04 '24 04:12 glitchyordis

@glitchyordis sorry! I haven't solve the issue,have you?

parzivar avatar Dec 10 '24 12:12 parzivar

ok,thank you a lot. I have solve the problem in simulation. Have you met this error and warning when running: bash run_learner.sh could you tell me your ubuntu and cuda version. Thank you very much for replying me!!! (serl) robo@robot:~/work/serl/examples/async_sac_state_sim$ bash run_learner.sh WARNING:absl:Type handler registry overriding type "<class 'float'>" collision on scalar WARNING:absl:Type handler registry overriding type "<class 'bytes'>" collision on scalar WARNING:absl:Type handler registry overriding type "<class 'numpy.number'>" collision on scalar 2024-11-13 10:36:01.557105: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered WARNING: All log messages before absl::InitializeLog() is called are written to STDERR E0000 00:00:1731465361.573055 68814 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered E0000 00:00:1731465361.577644 68814 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered 2024-11-13 10:36:03.592623: W external/xla/xla/service/gpu/nvptx_compiler.cc:760] The NVIDIA driver's CUDA version is 12.5 which is older than the ptxas CUDA version (12.6.77). Because the driver is older than the ptxas version, XLA is disabling parallel compilation, which may slow down compilation. You should update your NVIDIA driver or use the NVIDIA-provided CUDA forward compatibility packages. rlds logger is not installed, install it if required: https://github.com/rail-berkeley/oxe_envlogger /home/robo/miniconda3/envs/serl/lib/python3.10/site-packages/gym/spaces/box.py:127: UserWarning: WARN: Box bound precision lowered by casting to float32 logger.warn(f"Box bound precision lowered by casting to {self.dtype}") I1113 10:36:05.797586 140676277838464 schedule.py:75] A polynomial schedule was set with a non-positive transition_steps value; this results in a constant schedule with value init_value. /home/robo/work/serl/examples/async_sac_state_sim/async_sac_state_sim.py:282: DeprecationWarning: jax.tree_map is deprecated: use jax.tree.map (jax v0.4.25 or newer) or jax.tree_util.tree_map (any JAX version). jax.tree_map(jnp.array, agent), sharding.replicate() shape of observation space and action space Box(-inf, inf, (10,), float32) Box(-1.0, 1.0, (4,), float32) starting learner loop entity: null exp_descriptor: serl_dev_sim_test experiment_id: serl_dev_sim_test_20241113_103609 group: null project: serl_dev tag: serl_dev_sim_test unique_identifier: '20241113_103609'

Filling up replay buffer: 0%|

@parzivar The reason might be that you didn't start a actor.py node, learner.py is for training while the real online interaction and data collection is done in actor.py node. If you didn't start a actor.py node, no data collection will be done and thus the ReplayBuffer will always be empty, lead to the stuck of learner.py node training process.

Just follow the simulation readme, start 2 nodes in different terminals.

ZhaoRunyi avatar May 18 '25 02:05 ZhaoRunyi