赞
踩
宇树科技教程:https://support.unitree.com/home/zh/developer/rl_example
源码:https://github.com/unitreerobotics
pip install torch==1.13.1+cu116 torchvision==0.14.1+cu116 torchaudio==0.13.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116 # -i https://pypi.tuna.tsinghua.edu.cn/simple
更正版本:
pip install torch==2.2.1+cu116 torchvision==0.17.1+cu116 torchaudio==2.2.1+cu116 --extra-index-url https://download.pytorch.org/whl/cu116
怀疑可以torchaudio改成cu116
是可以的~
但cuda也要装成11.6版本,见笔者blog
之后一个里程碑完结撒花~
CUDAToolkit是一个用于GPU计算的软件开发工具包。它由NVIDIA开发,提供了一组CUDA编程模型的库、工具和文档,使开发者能够利用NVIDIA的GPU进行并行计算。
CUDA是一种并行计算平台和编程模型,可以通过在GPU上执行计算任务来加速应用程序。CUDAToolkit包含了用于编译、优化和调试CUDA代码的工具,以及大量的GPU加速库,如线性代数、图像处理和机器学习库等。
使用CUDAToolkit,开发者可以利用GPU的大规模并行计算能力,加速各种应用程序,包括科学计算、数据分析、深度学习等。CUDAToolkit支持多种编程语言,如C、C++、Python和Fortran,开发者可以选择最适合自己的编程语言进行GPU编程。
总之,CUDAToolkit是一个用于GPU计算的软件开发工具包,可以提供丰富的GPU加速库和工具,帮助开发者利用GPU进行并行计算加速。
在cudatoolkit11.6的加持下,使用pytorch+cuda11.6可以加速GPU计算。
solution:
pip install setuptools==59.5.0
ImportError: /home/flower/miniconda3/envs/rl-go2/bin/…/lib/libstdc++.so.6: version `GLIBCXX_3.4.32’ not found’
查找指定版本的gcc
strings /home/flowr/miniconda3/envs/rl-go2/lib/libstdc++.so.6 | grep GLIBCXX_3.4.32
发现libstdc++.so.6中缺少3.4.32版本,需要更新该libstdc++.so.6文件。
locate / "libstdc++.so.6"
查找根目录下的“libstdc++.so.6"文件
看看别的libstdc++.so.6是否包含
strings /home/flowr/miniconda3/envs/rl-go2/lib/libstdc++.so.6 | grep GLIBCXX_3.4.32 | grep GLIBCXX_3.4.32
没有
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX_3.4.32 | grep GLIBCXX_3.4.32
有了(之前按ubuntu ask question的教程更新了)
sudo apt-get install libstdc++6
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
我们只要把它复制到目标目录下即可
sudo cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /home/flowr/miniconda3/envs/rl-go2/lib/libstdc++.so.6
复制完成
该bug解决,
pip install tensorboard
和conda install tensorboard
效果一致。https://www.cnblogs.com/Q-M-double-j/p/18102664
更新:换成如下配置,仍然报错
声明:虚拟环境下GPU和CUDA(11.1)正常
python,torch,cudatoolkit,cuda,nvidia drive的版本如下:
CUDA向后兼容:可以兼容较早版本的其他软件(cudatoolkit)
执行isaacgym/python/examples/jointed_monkey.py,CPU可以正常跑,
指定为GPU,
在下述代码之前正常:
# joint animation states ANIM_SEEK_LOWER = 1 ANIM_SEEK_UPPER = 2 ANIM_SEEK_DEFAULT = 3 ANIM_FINISHED = 4 # initialize animation state anim_state = ANIM_SEEK_LOWER current_dof = 0 print("Animating DOF %d ('%s')" % (current_dof, dof_names[current_dof])) while not gym.query_viewer_has_closed(viewer): # step the physics gym.simulate(sim) gym.fetch_results(sim, True) speed = speeds[current_dof] # animate the dofs if anim_state == ANIM_SEEK_LOWER: dof_positions[current_dof] -= speed * dt if dof_positions[current_dof] <= lower_limits[current_dof]: dof_positions[current_dof] = lower_limits[current_dof] anim_state = ANIM_SEEK_UPPER elif anim_state == ANIM_SEEK_UPPER: dof_positions[current_dof] += speed * dt if dof_positions[current_dof] >= upper_limits[current_dof]: dof_positions[current_dof] = upper_limits[current_dof] anim_state = ANIM_SEEK_DEFAULT if anim_state == ANIM_SEEK_DEFAULT: dof_positions[current_dof] -= speed * dt if dof_positions[current_dof] <= defaults[current_dof]: dof_positions[current_dof] = defaults[current_dof] anim_state = ANIM_FINISHED elif anim_state == ANIM_FINISHED: dof_positions[current_dof] = defaults[current_dof] current_dof = (current_dof + 1) % num_dofs anim_state = ANIM_SEEK_LOWER print("Animating DOF %d ('%s')" % (current_dof, dof_names[current_dof])) if args.show_axis: gym.clear_lines(viewer) # clone actor state in all of the environments for i in range(num_envs): gym.set_actor_dof_states(envs[i], actor_handles[i], dof_states, gymapi.STATE_POS) if args.show_axis: # get the DOF frame (origin and axis) dof_handle = gym.get_actor_dof_handle(envs[i], actor_handles[i], current_dof) frame = gym.get_dof_frame(envs[i], dof_handle) # draw a line from DOF origin along the DOF axis p1 = frame.origin p2 = frame.origin + frame.axis * 0.7 color = gymapi.Vec3(1.0, 0.0, 0.0) gymutil.draw_line(p1, p2, color, gym, viewer, envs[i]) import pdb; pdb.set_trace() # update the viewer gym.step_graphics(sim) gym.draw_viewer(viewer, sim, True) # Wait for dt to elapse in real time. # This synchronizes the physics simulation with the rendering rate. gym.sync_frame_time(sim)
不能获取自由度
而且终端报错如下:
GPU显存没有过载,因为环境数目=1一样报错。
nvidia isaac gym教程:
https://www.nvidia.com/en-us/on-demand/search/?facet.mimetype[]=event%20session&layout=list&page=1&q=isaac%20gym&sort=relevance&sortDir=desc
执行错误:
internal error : PhysX Internal CUDA error. Simulation cannot continue!
ERROR: Package 'isaacgym' requires a different Python: 3.12.3 not in '<3.9,>=3.6'
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pysdf
ImportError: libpython3.8.so.1.0: cannot open shared object file: No such file or directory
配环境,卒
pip show isaacgym
```sh
python3

* 要用conda 执行xxx.sh
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。