按照大神文章安装:https://blog.csdn.net/weixin_37918890/article/details/96165880
sudo apt-get update
sudo apt-get install -y python-wstool python-rosdep ninja-build
mkdir rosws_cartographer
cd rosws_cartographer
wstool init src
wstool merge -t src /你放置onekey_install_cartographer.rosinstall的路径/onekey_install_cartographer.rosinstall
wstool update -t src
src/cartographer/scripts/install_proto3.sh
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
catkin_make_isolated --install --use-ninja
source install_isolated/setup.bash
树莓派执行依赖安装时
cd ~/rosws_cartographer
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
问题:出现pcl_msgs依赖找不到问题
ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
pcl_conversions: No definition of [pcl_msgs] for OS [debian]
尝试很多方法,都无法解决。之前安装成功了ros系统,发现src目录下面有pcl_msgs源码,直接拷到
cp -dar ~/ros_catkin_ws/src/pcl_msgs/ ~/rosws_cartographer/src
然后重新运行依赖安装
cd ~/rosws_cartographer
rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y
成功。
问题:
from /home/pi/rosws_cartographer/src/geometry2/tf2_ros/src/buffer_client.cpp:37:
/opt/ros/kinetic/include/ros/callback_queue.h:166:18: error: ‘condition_variable_monotonic’ in namespace ‘ros::internal’ does not name a type
ros::internal::condition_variable_monotonic condition_;
^
[6/11] Building CXX object CMak...ros.dir/src/buffer_server.cpp.o
ninja: build stopped: subcommand failed.
<== Failed to process package 'tf2_ros':
Command '['/home/pi/rosws_cartographer/install_isolated/env.sh', 'ninja', '-j4', '-l4']' returned non-zero exit status 1
Reproduce this error by running:
==> cd /home/pi/rosws_cartographer/build_isolated/tf2_ros && /home/pi/rosws_cartographer/install_isolated/env.sh ninja -j4 -l4
附录:
已安装成功的树莓派4B ROS镜像
https://pan.baidu.com/s/1u3Jkp23zhyuS8k16NUsmig
提取码:uno9
制作SD卡方法:
1、先合并文件
cat raspberry_a* > raspberry.tar.bz2
2、树莓派系统还原
sudo tar -xf bill-ros-kinetic-sd-card201112.tar.bz2 | sudo dd bs=512M of=/dev/SD卡设备(注意是整个盘,例如sdb,不是分区sdb1,sdb2)
账号:pi
密码:raspberry
注:
这个镜像支持16G以上TF卡,大于16G的制作完后,可以用树莓派配置扩充空间。
rsap-config -> 6 Advanced Options -> A1 Expand Filesystem