跟着古月居教程下载togetherros的例程代码后,编译工作空间的时候报错
-
先抱歉一下由于我不知道代码块包裹啥意思只能先复制粘贴了
下面是运行了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_cvThis 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 2Failed <<< 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该加在哪 -
@1017011691 这个你估计要找原作者问问了,因为togetheros是经过定制的,具体细节小鱼也不太清楚,可以加一下古月居和地平线的售后人员问一下哈!
代码包裹可以使用三个 ` 符号使用。也可以点击菜单栏</>进行使用。
这是没有包裹的代码
int a = b这是包裹后的代码 int a = b