关于ros_humble消息文件

huangapple go评论94阅读模式
英文:

about ros_humble msg file

问题

我已经成功在ros_galactic上构建了项目,由于其他一些问题,我将我的ros版本更改为humble,之后出现了一些问题。我遇到了以下错误:

在文件包含自/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep__functions.h:19,
                 自/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep__functions.c:4:
/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep__struct.h:76:10: 致命错误: geometry_msgs/msg/detail/pose__struct.h: 没有那个文件或目录
   76 | #include "geometry_msgs/msg/detail/pose__struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
编译已终止。
在文件包含自/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/exec_footsteps__struct.h:34,
                 自/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/exec_footsteps__functions.h:19,
                 自/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/exec_footsteps__functions.c:4:
/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep_array__struct.h:22:10: 致命错误: std_msgs/msg/detail/header__struct.h: 没有那个文件或目录
   22 | #include "std_msgs/msg/detail/header__struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
编译已终止。
在文件包含自/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/plan_footsteps__struct.h:23,
                 自/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/plan_footsteps__functions.h:19,
                 自/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/plan_footsteps__functions.c:4:
/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep_array__struct.h:22:10: 致命错误: std_msgs/msg/detail/header__struct.h: 没有那个文件或目录
   22 | #include "std_msgs/msg/detail/header__struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
编译已终止。
在文件包含自/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep_array__functions.h:19,
                 自/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep_array__functions.c:4:
/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep_array__struct.h:22:10: 致命错误: std_msgs/msg/detail/header__struct.h: 没有那个文件或目录
   22 | #include "std_msgs/msg/detail/header__struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
编译已终止。

我检查了我的ros_humble源代码。我相信正确的路径是 ./install/std_msgs/msg,而我的路径是 ./install/std_msgs/std_msgs/msg。我想这就是问题的原因,但我不知道该如何解决。有人可以帮我吗?另外,std_msgs的源代码位于 ~/ros2_humble/src/ros2/common_interfaces,整个ros2项目是从GitHub克隆下来的。

我阅读了CMakeLists.txtpackage.xml,想做些什么,但我没有发现任何问题。

英文:

I've already successfully build the project on the ros_galactic, and due to some other questions, I changed my ros version into humble and after which some questions occurs.
I get the following error:

In file included from /home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep__functions.h:19,
                 from /home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep__functions.c:4:
/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep__struct.h:76:10: fatal error: geometry_msgs/msg/detail/pose__struct.h: 没有那个文件或目录
   76 | #include "geometry_msgs/msg/detail/pose__struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/exec_footsteps__struct.h:34,
                 from /home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/exec_footsteps__functions.h:19,
                 from /home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/exec_footsteps__functions.c:4:
/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep_array__struct.h:22:10: fatal error: std_msgs/msg/detail/header__struct.h: 没有那个文件或目录
   22 | #include "std_msgs/msg/detail/header__struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/plan_footsteps__struct.h:23,
                 from /home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/plan_footsteps__functions.h:19,
                 from /home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/action/detail/plan_footsteps__functions.c:4:
/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep_array__struct.h:22:10: fatal error: std_msgs/msg/detail/header__struct.h: 没有那个文件或目录
   22 | #include "std_msgs/msg/detail/header__struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep_array__functions.h:19,
                 from /home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep_array__functions.c:4:
/home/universe/Desktop/HRT/workspace/build/jsk_footstep_msgs/rosidl_generator_c/jsk_footstep_msgs/msg/detail/footstep_array__struct.h:22:10: fatal error: std_msgs/msg/detail/header__struct.h: 没有那个文件或目录
   22 | #include "std_msgs/msg/detail/header__struct.h"
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

And I checked my ros_humble source code. The right path I believe is ./install/std_msgs/msg while my path is ./install/std_msgs/std_msgs/msg. I guess that's the reason, but i don't know how to solve it. Could any body help me please.
By the way, the source code of std_msgs is under ~/ros2_humble/src/ros2/common_interfaces and the whole ros2 project was cloned from the github.

I read the CMakeLists.txt and package.xml and want to do something, but I find nothing wrong.

答案1

得分: 2

std_msgs文件夹在您的安装文件夹中不是问题所在。std_msgs是一个常见的包,应该已经与基本版本一起安装,因此无需克隆它。您可以通过在Linux终端中运行apt search ros std msgs来验证安装。

英文:

The folder std_msgs in your install folder is not the issue. std_msgs is a common package and should be installed with the humble version, so no need to clone it. You can verify the installation by calling apt search ros std msgs
in the Linux terminal.

huangapple
  • 本文由 发表于 2023年7月10日 20:04:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/76653560.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定