Skip to content

Commit

Permalink
feat: 更新cartographer安装 (#47)
Browse files Browse the repository at this point in the history
* 维护cartographer安装脚本

* 维护cartographer安装脚本

* 维护cartographer安装脚本

---------

Co-authored-by: Catalpa <[email protected]>
  • Loading branch information
Y-zi and Catalpa authored Jan 26, 2024
1 parent c06674c commit 17dd821
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
- 一键配置:ROS环境(快速更新ROS环境设置,自动生成环境选择) [贡献@小鱼](https://github.com/fishros)
- 一键配置:系统源(更换系统源,支持全版本Ubuntu系统) [贡献@小鱼](https://github.com/fishros)
- 一键安装:Docker(支持amd64和arm64) [贡献@alyssa](https://github.com/alyssa1024)
- 一键安装:cartographer [贡献@小鱼&Catalpa ](https://github.com/fishros)
- 一键安装:cartographer 贡献 [@小鱼](https://github.com/fishros) & [@Catalpa](https://github.com/Y-zi)
- 一键安装:微信客户端 [贡献@小鱼](https://github.com/fishros)


Expand Down
2 changes: 1 addition & 1 deletion install.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
6: {'tip':'一键安装:NodeJS环境', 'type':INSTALL_SOFTWARE, 'tool':url_prefix+'tools/tool_install_nodejs.py' ,'dep':[] },
7: {'tip':'一键安装:VsCode开发工具', 'type':INSTALL_SOFTWARE, 'tool':url_prefix+'tools/tool_install_vscode.py' ,'dep':[] },
8: {'tip':'一键安装:Docker', 'type':INSTALL_SOFTWARE, 'tool':url_prefix+'tools/tool_install_docker.py' ,'dep':[] },
9: {'tip':'一键安装:Cartographer(内测版易失败)', 'type':INSTALL_ROS, 'tool':url_prefix+'tools/tool_install_cartographer.py' ,'dep':[3] },
9: {'tip':'一键安装:Cartographer(18 20测试通过,16未测. updateTime 20240125)', 'type':INSTALL_ROS, 'tool':url_prefix+'tools/tool_install_cartographer.py' ,'dep':[3] },
10: {'tip':'一键安装:微信(可以在Linux上使用的微信)', 'type':INSTALL_SOFTWARE, 'tool':url_prefix+'tools/tool_install_wechat.py' ,'dep':[8] },
21: {'tip':'一键安装:ROS Docker版(支持所有版本ROS/ROS2)', 'type':INSTALL_ROS, 'tool':url_prefix+'tools/tool_install_ros_with_docker.py' ,'dep':[7,8] },
12: {'tip':'一键安装:PlateformIO MicroROS开发环境(支持Fishbot)', 'type':INSTALL_SOFTWARE, 'tool':url_prefix+'tools/tool_install_micros_fishbot_env.py' ,'dep':[] },
Expand Down
13 changes: 4 additions & 9 deletions tools/tool_install_cartographer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class Tool(BaseTool):
def __init__(self):
self.name = "一键安装Cartographer"
self.type = BaseTool.TYPE_INSTALL
self.autor = '众筹'
self.autor = 'catalpa'

def get_sys_default_ros_version(self):
if osversion.get_version().find('18')>=0:
Expand Down Expand Up @@ -40,19 +40,14 @@ def install_docker(self):
CmdTask('git clone https://gitee.com/yuzi99url/cartographer_ros.git',path='cartographer_ws/src').run()
CmdTask('git clone https://gitee.com/yuzi99url/cartographer.git',path='cartographer_ws/src').run()
# 3
run_tool_file('tools.tool_config_rosdep')
CmdTask('rosdepc update --include-eol-distros').run()
CmdTask('rosdepc install --from-paths src --ignore-src --rosdistro={} -y'.format(ros_version),path='cartographer_ws').run()
CmdTask("sudo apt-get install libamd2 libatlas3-base libbtf1 libcamd2 libccolamd2 libceres-dev libceres1 libcholmod3 libcxsparse3 libgflags-dev libgflags2.2 libgoogle-glog-dev libgoogle-glog0v5 libklu1 libldl2 liblua5.2-0 liblua5.2-dev libmetis5 libncurses5 libncursesw5 librbio2 libreadline-dev libspqr2 libsuitesparse-dev libtinfo-dev libtinfo5 libtool-bin libumfpack5 -y").run()
if ros_version == "melodic":
CmdTask('sudo apt-get libgraphblas1 -y').run()
# 4
CmdTask("sudo apt-get remove ros-{}-abseil-cpp -y".format(ros_version)).run()
FileUtils.find_replace("cartographer_ws/src/cartographer/scripts/install_abseil.sh", "https://github.com/abseil/abseil-cpp.git", "https://gitee.com/yuzi99url/abseil-cpp.git")
CmdTask('bash src/cartographer/scripts/install_abseil.sh',path='cartographer_ws').run()
# 5
CmdTask("sudo mv /usr/bin/protoc /usr/bin/protoc.bk").run()
CmdTask("sudo ln -s /usr/local/bin/protoc /usr/bin/protoc").run()
FileUtils.find_replace("cartographer_ws/src/cartographer/scripts/install_proto3.sh", "https://github.com/google/protobuf.git", "https://gitee.com/yuzi99url/protobuf.git")
CmdTask('bash src/cartographer/scripts/install_proto3.sh',path='cartographer_ws').run()
# 6
CmdTask("catkin_make_isolated --install --use-ninja",'cartographer_ws').run()
CmdTask("sudo chmod -R 777 cartographer_ws").run()

Expand Down

0 comments on commit 17dd821

Please sign in to comment.