开wangwang的机器,看哪个容器装了ros-noetic-cuda11.4.2,没有的输入如下指令安装
bash展开代码docker pull mzahana/ros-noetic-cuda11.4.2
bash展开代码xd@euler-MS-7D30:/data/xiedong$ xhost + xd@euler-MS-7D30:/data/xiedong$ xclock
bash展开代码docker run \ -e QT_X11_NO_MITSHM=1 \ -e DISPLAY \ --net=host \ --gpus all \ -v ~/.Xauthority:/root/.Xauthority:rw \ -v ~/tmp/.X11-unix:/tmp/.X11-unix:ro \ -v ~/out_home:/out_home \ -v /data/xiedong/cc_ws:/cc_ws \ -it kevinchina/deeplearning:ros-noetic-cuda11.4.2-v5 bash
bash展开代码vim /etc/ssh/sshd_config service ssh restart
注意看第5行,是需要显卡资源的,所以如果没有显卡资源就会这么显示:
docker: Error response from daemon: could not select device driver "" with capab [[gpu]] ,也进不了容器
安装好后
bash展开代码docker ps
查看容器,进入
bash展开代码docker exec -it 954 bash
bash展开代码cd ego-planner/
bash展开代码sudo apt-get install libarmadillo-dev -y
bash展开代码catkin_make -DCMAKE_BUILD_TYPE=Release
打开 rviz 进行可视化和交互:
bash展开代码source devel/setup.bash
roslaunch ego_planner rviz.launch
运行后出现这个:
可能显卡出问题了
退出容器
bash展开代码exit
再重启容器
bash展开代码docker restart <id>
重新进入
docker exec -it...
重复上述步骤
运行
bash展开代码source devel/setup.bash
roslaunch ego_planner rviz.launch
另开一个终端,在仿真中运行规划器:
bash展开代码docker exec -it <id> bash
cd ego-planner/
source devel/setup.bash
roslaunch ego_planner run_in_sim.launch
记录一下安装pandas的步骤以及输出:
启动python解释器,调用系统默认Python环境
bash展开代码(base) cc@LAPTOP-2A2OV24P:~$ python
Python 3.13.5 | packaged by Anaconda, Inc. | (main, Jun 12 2025, 16:09:02) [GCC 11.2.0 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
检查Python路径,显示默认Python解释器的实际路径
bash展开代码(base) cc@LAPTOP-2A2OV24P:~$ which python
/home/cc/miniconda3/bin/python #输出
检查Conda路径,确认Conda的安装位置
bash展开代码(base) cc@LAPTOP-2A2OV24P:~$ which conda
/home/cc/miniconda3/bin/conda
直接调用绝对路径的Python:/home/cc/miniconda3/bin/python→ 效果与步骤1相同
bash展开代码(base) cc@LAPTOP-2A2OV24P:~$ /home/cc/miniconda3/bin/python
Python 3.13.5 | packaged by Anaconda, Inc. | (main, Jun 12 2025, 16:09:02) [GCC 11.2.0 ] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
尝试创建新Conda环境→ 准备创建名为 py310的新环境
bash展开代码conda create -n py310
激活py310环境,并检查python路径
bash展开代码conda activate py310
which python
实践:
bash展开代码(base) cc@LAPTOP-2A2OV24P:~$ conda activate py310
(py310) cc@LAPTOP-2A2OV24P:~$ conda env list
# conda environments:
#
base /home/cc/miniconda3
py310 * /home/cc/miniconda3/envs/py310
(py310) cc@LAPTOP-2A2OV24P:~$ which python
/home/cc/miniconda3/envs/py310/bin/python
切换回base环境,并验证python路径
bash展开代码conda activate base
which python
实践:
bash展开代码```bash
(py310) cc@LAPTOP-2A2OV24P:~$ conda activate base
(base) cc@LAPTOP-2A2OV24P:~$ which python
/home/cc/miniconda3/bin/python
返回py310环境安装pandas
bash展开代码conda activate py310 pip install pandas
在特定环境下执行的命令(如pip install)仅作用于当前环境


电机模型:
反电动势 (emf) 与角速度 相关。
因为:
所以:
电机转矩 和反电动势 (emf) 有关: