A
APOLLO
play .record
1
2
3
cyber_recorder play -f sensor_rgb.record -loop
cyber_visualizer ### channle 监控
cyber_monitor -c ChannelName
sdk/repo download
1
cd omnisense && ./tools/build.bash init all
启动数据集
1
2
3
4
5
6
source /apollo/cyber/setup.bash
1 改launch/conf/driver_01_debug.pb.txt --------------------data route
2 改launch/dag/driver_single_debug.dag -------------------config_file_path
3 改launch/intergration_single_lidar_debug.launch ------------master .dag_path
4 cyber_launch start modules/omnisense/launch/integration_single_lidar_debug.launch
5 http://viewer.innovusion.info/v60/?url=127.0.0.1&port=8003/stream&autoplay=1.0
点云录制
1
2
3
4
5
6
1. get_pcd/01.get_pcd.pb.txt ----------channel1: dynamic_points ----- channel2: static_points channel3: -----enable_channel1_get_pcd:true
2. .dag修改路径 ### orders
root@in-dev-docker:/apollo# ./apollo.sh build_opt omnisense cyber
root@in-dev-docker:/apollo/modules/omnisense# git branch
master
root@in-dev-docker:/apollo/modules/omnisense# git checkout dev Branch ‘dev’ set up to track remote branch ‘dev’ from ‘origin’. Switched to a new branch ‘dev’ root@in-dev-docker:/apollo/modules/omnisense# cd - /apollo
root@in-dev-docker:/apollo# ./modules/omnisense/tools/build.bash build all
xng@xng:~/CODE/OmniSense2.0/apollo$ ./docker/scripts/dev_into.sh
B
C
CUDA
pytorch 对应 cuda版本
1
2
import torch
print(torch.version.cuda)
CUDA
1
2
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
cudnn .tar install
1
2
3
sudo cp cudnn-*-archive/include/cudnn*.h /usr/local/cuda/include
sudo cp -P cudnn-*-archive/lib/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn* # D ## Docker ### docker 可视化
1
2
// RVIZ cannot display
docker run --add-host=demo:172.16.115.75 -it --name osrf_melodic_full --net host --add-host $(hostname):127.0.0.1 --gpus all -v /tmp/.x11-unix:/tmp/.x11-unix -e DISPLAY=unix$DISPLAY -e GDK_SCALE -e GDK_DPI_SCALE -v /home/xng/CODE/osrf_melodic_full/:/home osrf/ros:melodic-desktop-full /bin/bash
1
docker run –name ContainerName –gpus all –network host –env=DISPLAY –env=NVIDIA_DRIVER_CAPABILITIES=all -env=NVIDIA-VISIBLE_DEVICES=all –env=QT_X11_NO_MITSHM=1 -v /tmp/.X11-unix:/tmp/.X11-unix:rw –runtime=nvidia –privileged -it DockerImage
Cannot access GPU from within container. Please install latest Docker and NVIDIA Container Toolkit as described by:
- https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker
报错Failed to connect. Is Docker running
1
2
3
4
5
6
Error: connect EACCES /var/run/docker.sock
sudo groupadd docker #添加docker用户组
sudo gpasswd -a $USER docker #将当前用户添加至docker用户组
newgrp docker #更新docker用户组
在终端打开vsode
code
docker container 查看/启动/进入
1
2
3
4
5
6
docker container ls --all
docker start apollo_dev_root
docker ps
sudo docker exec -it ae76016acd18 /bin/bash
source /apollo/cyber/setup.bash
docker group
1
2
3
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
docker images / container
1
2
3
docker pull
docker run -it {name}:
docker exec -it {ID} /bin/bash
docker 拷贝本地文件到容器/容器到本地文件
1
docker cp 你的文件路径 容器长ID/name:docker容器路径 # E ## ERROR
EVO
1
2
3
4
5
evo_ape tum 0_odom 5_imu_pose_after_trans.txt -va -r full -p --plot_mode xy`
evo_traj kitti KITTI_00_ORB.txt KITTI_00_SPTAM.txt --ref=KITTI_00_gt.txt -p --plot_mode=xz
evo_rpe tum 0_odom 5_imu_pose_after_trans.txt -r full -p --plot_mode xy
F
G
GDB
1
2
3
gdb -q --args /apollo/bazel-bin/cyber/mainboard/mainboard -d /apollo/modules/omnisense/pose_monitor/dag/inno_pose_monitor.dag
./bazel-bin/modules/omnisense/gps_info_capture/ins_posetrans_test
GIT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
git init
touch Readme_new
git add .
git commit -m '提交的备注信息'
git push -u origin dev
git remote add origin https://github.com/你的github用户名/你的github仓库.git
git push origin master
git pull origin master
更新远程分支列表
git remote update origin --prune
查看所有分支
git branch -a
删除远程分支Chapater6
git push origin --delete Chapater6
删除本地分支 Chapater6
git branch -d Chapater6
//at your own branch
git add <change>
git commit -m "***"
// checkout to destieny branch
git checkout autonoumous_driving
git pull
// back to own branch
git checkout ad_posemonitor
git merge autonoumous_driving
// fix conflict in vscode
git commit -m "***"
git push
.gitignore文件不起作用的解决方法
# 0. 进入项目路径
# 1. 清除本地当前的Git缓存
git rm -r --cached .
# 2. 应用.gitignore等本地配置文件重新建立Git索引
git add .
# 3. (可选)提交当前Git版本并备注说明
git commit -m 'update .gitignore'
从bitbucket下载:
1
2
3
4
5
6
ssh-add ~/key
git clone -b dev git@bitbucket.org:ivusw/omnisense.git
git pull" 来更新您的本地分支
git reset HEAD <文件>..." 以取消暂存
git stash 暂存
git pull 将远程存储库中的更改合并到当前分支中。 ---------- # H
I
INNOVUSION
falcon-ros:
1
2
3
4
5
6
7
8
9
10
11
12
13
//改ipv4:10.42.0.91
http://10.42.0.91:8675/config.pyhtml
//驱动版本是否匹配?/关网页点云
//不匹配:
~/falcon-lidar-sdk/build$ ./download-sdk-release.py ros-melodic-innovusion-driver-release-2.5.0-rc260-public.deb
sudo dpkg -l | grep inno
sudo dpkg -r ros-melodic-innovusion-driver-public //卸载旧驱动
sudo dpkg -i ros-melodic-innovusion-driver-release-2.5.0-rc260-public.deb
roslaunch innovusion_pointcloud innovusion_points.launch device_ip:=10.42.0.91
rosbag record /ivpoints -o /home/xng/data/name.bag
//bag2pcd
rosrun pcl_ros bag_to_pcd <input_file.bag> <topic> <output_directory> # J
K
L
M
N
O
P
python
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# os.path.dirname (file)返回的是.py文件的目录
# os.path.abspath (file)返回的是.py文件的绝对路径
os.path.dirname(os.path.abspath(__file__))
import os
print('***获取当前目录***')
print("当前目录是:{}".format(os.getcwd()))
print("当前目录是:{}".format(os.path.abspath(os.path.dirname(__file__))))
print('***获取上级目录***')
print("上级目录是:{}".format(os.path.abspath(os.path.dirname(os.path.dirname(__file__)))))
print("上级目录是:{}".format(os.path.abspath(os.path.dirname(os.getcwd()))))
print("上级目录是:{}".format(os.path.abspath(os.path.join(os.getcwd(), ".."))))
print('***获取上上级目录***')
print("上上级目录是:{}".format(os.path.abspath(os.path.join(os.getcwd(), "../.."))))
//拼接文件路径
sys.path.append()
Q
R
ROS
fixed frame trans
1
rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0.0 base_link innovusion 100
Rosbag to pcd/txt:
1
rosrun pcl_ros bag_to_pcd <input_file.bag> <topic> <output_directory>
1
2
rosbag play XXX.bag
rosrun pcl_ros pointcloud_to_pcd input:=/velodyne_points
- rosbag topic to txt:
1
rostopic echo -b filename.bag -p /topic > txtname.txt
查看frame_id
1
rostopic echo /topic | grep frame_id -------------- # S
T
torch
- numpy2torch / torch2numpy
1
2
tor_datas = torch.from_numpy(data)
tor2numpy=tor_arr.numpy(