鱼香ROS社区
    • 版块
    • 最新
    • 未解决
    • 已解决
    • 群组
    • 注册
    • 登录
    紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
    提问前必看的发帖注意事项: 社区问答规则(小鱼个人)更新 | 高质量帖子发布指南

    跟着古月居教程下载togetherros的例程代码后,编译工作空间的时候报错

    已定时 已固定 已锁定 已移动
    ROS 2相关问题
    togetherros 古月居 ai与视觉应用
    2
    2
    451
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 10170116911
      -
      最后由 编辑

      先抱歉一下由于我不知道代码块包裹啥意思只能先复制粘贴了😣
      下面是运行了colcon build后的报错
      root@ubuntu:/userdata/dev_ws# colcon build
      [2.880s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
      'hobot_cv' is in: /opt/tros
      If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
      If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

      If you understand the risks and want to override a package anyways, add the following to the command line:
      --allow-overriding hobot_cv

      This may be promoted to an error in a future release of colcon-override-check.
      Starting >>> cpp_dnn_demo
      Starting >>> hbmem_pubsub
      Starting >>> hobot_cv
      Starting >>> learning_action_cpp
      This may be promoted to an error in a future release of colcon-override-check. [Processing: cpp_dnn_demo, hbmem_pubsub, hobot_cv, learning_action_cpp]
      --- stderr: hbmem_pubsub
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/subscriber_hbmem.cpp:35:11: error: ‘SubscriptionHbmem’ in namespace ‘rclcpp’ does not name a template type; did you mean ‘SubscriptionBase’?
      35 | rclcpp::SubscriptionHbmem<hbmem_pubsub::msg::SampleMessage>::SharedPtr
      | ^~~~~~~~~~~~~~~~~
      | SubscriptionBase
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/subscriber_hbmem.cpp: In constructor ‘MinimalHbmemSubscriber::MinimalHbmemSubscriber()’:
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/subscriber_hbmem.cpp:12:5: error: ‘subscription_’ was not declared in this scope; did you mean ‘rcl_subscription_t’?
      12 | subscription_ =
      | ^~~~~~~~~~~~~
      | rcl_subscription_t
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/subscriber_hbmem.cpp:13:15: error: ‘class MinimalHbmemSubscriber’ has no member named ‘create_subscription_hbmem’; did you mean ‘create_subscription’?
      13 | this->create_subscription_hbmem<hbmem_pubsub::msg::SampleMessage>(
      | ^~~~~~~~~~~~~~~~~~~~~~~~~
      | create_subscription
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/subscriber_hbmem.cpp:13:73: error: expected primary-expression before ‘>’ token
      13 | this->create_subscription_hbmem<hbmem_pubsub::msg::SampleMessage>(
      | ^
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/subscriber_hbmem.cpp:14:13: warning: left operand of comma operator has no effect [-Wunused-value]
      14 | "topic", 10,
      | ^~~~~~~
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/subscriber_hbmem.cpp:16:44: warning: right operand of comma operator has no effect [-Wunused-value]
      16 | std::placeholders::1));
      | ^
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/publisher_hbmem.cpp:59:11: error: ‘PublisherHbmem’ in namespace ‘rclcpp’ does not name a template type; did you mean ‘PublisherBase’?
      59 | rclcpp::PublisherHbmem<hbmem_pubsub::msg::SampleMessage>::SharedPtr publisher
      ;
      | ^~~~~~~~~~~~~~
      | PublisherBase
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/publisher_hbmem.cpp: In constructor ‘MinimalHbmemPublisher::MinimalHbmemPublisher()’:
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/publisher_hbmem.cpp:16:5: error: ‘publisher_’ was not declared in this scope; did you mean ‘rcl_publisher_t’?
      16 | publisher_ = this->create_publisher_hbmem<hbmem_pubsub::msg::SampleMessage>(
      | ^~~~~~~~~~
      | rcl_publisher_t
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/publisher_hbmem.cpp:16:24: error: ‘class MinimalHbmemPublisher’ has no member named ‘create_publisher_hbmem’; did you mean ‘create_publisher’?
      16 | publisher_ = this->create_publisher_hbmem<hbmem_pubsub::msg::SampleMessage>(
      | ^~~~~~~~~~~~~~~~~~~~~~
      | create_publisher
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/publisher_hbmem.cpp:16:79: error: expected primary-expression before ‘>’ token
      16 | publisher_ = this->create_publisher_hbmem<hbmem_pubsub::msg::SampleMessage>(
      | ^
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/publisher_hbmem.cpp:17:9: warning: left operand of comma operator has no effect [-Wunused-value]
      17 | "topic", 10);
      | ^~~~~~~
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/publisher_hbmem.cpp: In member function ‘void MinimalHbmemPublisher::timer_callback()’:
      /userdata/dev_ws/src/togetherros_tutorials/hbmem_pubsub/src/publisher_hbmem.cpp:28:22: error: ‘publisher_’ was not declared in this scope; did you mean ‘rcl_publisher_t’?
      28 | auto loanedMsg = publisher_->borrow_loaned_message();
      | ^~~~~~~~~~
      | rcl_publisher_t
      make[2]: *** [CMakeFiles/listener.dir/build.make:63: CMakeFiles/listener.dir/src/subscriber_hbmem.cpp.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:157: CMakeFiles/listener.dir/all] Error 2
      make[1]: *** Waiting for unfinished jobs....
      make[2]: *** [CMakeFiles/talker.dir/build.make:63: CMakeFiles/talker.dir/src/publisher_hbmem.cpp.o] Error 1
      make[1]: *** [CMakeFiles/Makefile2:354: CMakeFiles/talker.dir/all] Error 2
      make: *** [Makefile:141: all] Error 2

      Failed <<< hbmem_pubsub [36.2s, exited with code 2]
      Aborted <<< hobot_cv [44.1s]
      Aborted <<< learning_action_cpp [50.3s]
      Aborted <<< cpp_dnn_demo [1min 7s]

      Summary: 0 packages finished [1min 9s]
      1 package failed: hbmem_pubsub
      3 packages aborted: cpp_dnn_demo hobot_cv learning_action_cpp
      2 packages had stderr output: hbmem_pubsub hobot_cv
      2 packages not processed
      这是我git' clone 的源码
      https://gitee.com/guyuehome/togetherros_tutorials.git
      然后我上了这个网站上看发现他说要在前面加个readme,我不清楚是不是这个原因,查了很多资料也不知道readme该加在哪😵

      小鱼小 1 条回复 最后回复 回复 引用 0
      • 小鱼小
        小鱼 技术大佬 @1017011691
        最后由 编辑

        @1017011691 这个你估计要找原作者问问了,因为togetheros是经过定制的,具体细节小鱼也不太清楚,可以加一下古月居和地平线的售后人员问一下哈!


        代码包裹可以使用三个 ` 符号使用。也可以点击菜单栏</>进行使用。

        这是没有包裹的代码
        int a = b

        这是包裹后的代码
        int a = b
        

        新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

        1 条回复 最后回复 回复 引用 0
        • 第一个帖子
          最后一个帖子
        皖ICP备16016415号-7
        Powered by NodeBB | 鱼香ROS