官方代码下载自github(gitlab),如何访问外网的问题这里可以合法合规解决,就是先把github的代码导入gitee,再采取同步的方式解决:
原代码段如下:仔细看代码内容,链接路径全为github。
cat << 'EOF' > krs_rolling.repos
repositories:
ros2/ament_lint:
type: git
url: https://github.com/ament/ament_lint
version: master
ros2/launch:
type: git
url: https://github.com/ros2/launch
version: master
ros2/gazebo_ros_pkgs:
type: git
url: https://github.com/ros-simulation/gazebo_ros_pkgs
version: da14a69e79502cd08064ccd261366ff023a9162a
perception/image_common:
type: git
url: https://github.com/ros-perception/image_common
version: 9729de81f7dff6156f644d6152b200f687360f1f
perception/image_pipeline:
type: git
url: https://github.com/ros-acceleration/image_pipeline
version: beta
perception/vision_opencv:
type: git
url: https://github.com/ros-perception/vision_opencv
version: 7bbc5ecc232e8faf36b45efaa2b6bc979b04157f
tracing/ros2_tracing:
type: git
url: https://gitlab.com/ros-tracing/ros2_tracing.git
version: master
tracing/tracetools_acceleration:
type: git
url: https://github.com/ros-acceleration/tracetools_acceleration
version: main
acceleration/acceleration_firmware:
type: git
url: https://github.com/ros-acceleration/acceleration_firmware
version: main
acceleration/acceleration_firmware_kv260:
type: zip
url: https://github.com/ros-acceleration/acceleration_firmware_kv260/releases/download/v0.9.0/acceleration_firmware_kv260.zip
acceleration/adaptive_component:
type: git
url: https://github.com/ros-acceleration/adaptive_component
version: main
acceleration/ament_acceleration:
type: git
url: https://github.com/ros-acceleration/ament_acceleration
version: main
acceleration/ament_vitis:
type: git
url: https://github.com/ros-acceleration/ament_vitis
version: beta
acceleration/colcon-acceleration:
type: git
url: https://github.com/ros-acceleration/colcon-acceleration
version: main
acceleration/ros2_kria:
type: git
url: https://github.com/ros-acceleration/ros2_kria
version: main
acceleration/ros2acceleration:
type: git
url: https://github.com/ros-acceleration/ros2acceleration
version: main
acceleration/vitis_common:
type: git
url: https://github.com/ros-acceleration/vitis_common
version: master
acceleration/acceleration_examples:
type: git
url: https://github.com/ros-acceleration/acceleration_examples
version: beta
EOF修改为如下代码:(我已经将github代码导入gitee,声明纯学习目的,方便国内开发者)
cat << 'EOF' > krs_rolling.repos
repositories:
ros2/ament_lint:
type: git
url: https://gitee.com/mk8/ament_lint
version: master
ros2/launch:
type: git
url: https://gitee.com/mk8/launch
version: master
ros2/gazebo_ros_pkgs:
type: git
url: https://gitee.com/mk8/gazebo_ros_pkgs
version: da14a69e79502cd08064ccd261366ff023a9162a
perception/image_common:
type: git
url: https://gitee.com/mk8/image_common
version: 9729de81f7dff6156f644d6152b200f687360f1f
perception/image_pipeline:
type: git
url: https://gitee.com/mk8/image_pipeline
version: beta
perception/vision_opencv:
type: git
url: https://gitee.com/mk8/vision_opencv
version: 7bbc5ecc232e8faf36b45efaa2b6bc979b04157f
tracing/ros2_tracing:
type: git
url: https://gitee.com/mk8/ros2_tracing
version: master
tracing/tracetools_acceleration:
type: git
url: https://gitee.com/mk8/tracetools_acceleration
version: main
acceleration/acceleration_firmware:
type: git
url: https://gitee.com/mk8/acceleration_firmware
version: main
acceleration/adaptive_component:
type: git
url: https://gitee.com/mk8/adaptive_component
version: main
acceleration/ament_acceleration:
type: git
url: https://gitee.com/mk8/ament_acceleration
version: main
acceleration/ament_vitis:
type: git
url: https://gitee.com/mk8/ament_vitis
version: beta
acceleration/colcon-acceleration:
type: git
url: https://gitee.com/mk8/colcon-acceleration
version: main
acceleration/ros2_kria:
type: git
url: https://gitee.com/mk8/ros2_kria
version: main
acceleration/ros2acceleration:
type: git
url: https://gitee.com/mk8/ros2acceleration
version: main
acceleration/vitis_common:
type: git
url: https://gitee.com/mk8/vitis_common
version: master
acceleration/acceleration_examples:
type: git
url: https://gitee.com/mk8/acceleration_examples
version: beta
EOF另外,对比上述代码,还少了一个zip包,该包是官方生成的kv260嵌入式bsp支持包,这个没办法,请自己下载。
acceleration/acceleration_firmware_kv260:
type: zip
url: https://github.com/ros-acceleration/acceleration_firmware_kv260/releases/download/v0.9.0/acceleration_firmware_kv260.zip上述链接请手动下载即可,下载之后
cd src/acceleration
拷贝你的acceleration_firmware_kv260.zip到该目录下,解压即可
这个插曲之后再进行安装编译。
编译完成如图:

版权声明:本文为mamak426原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。