Skip to main content
Removed "Edit" note as edit history can be seen in the edit link. Fixed typo.
Source Link
Greenonline
  • 1.7k
  • 6
  • 21
  • 32

Have you added the new interfaces package to your ament_target_dependencies?

This is how my CMakeLists.txt looks like for a cpp executable:

...
find_package(reconstruction_msgs REQUIRED)
...

# Executables ------------------------------
add_executable(gp25_services_node
  src/ros_nodes/gp25_services_node.cpp
)
ament_target_dependencies( gp25_services_node
  rclcpp
  rclcpp_action
  moveit_ros_planning_interface
  reconstruction_msgs
)

The custumcustom interface package in my case is the reconstruction_msgs.

Edit: AlsoAlso make sure your #include ends with .hpp.

Have you added the new interfaces package to your ament_target_dependencies?

This is how my CMakeLists.txt looks like for a cpp executable:

...
find_package(reconstruction_msgs REQUIRED)
...

# Executables ------------------------------
add_executable(gp25_services_node
  src/ros_nodes/gp25_services_node.cpp
)
ament_target_dependencies( gp25_services_node
  rclcpp
  rclcpp_action
  moveit_ros_planning_interface
  reconstruction_msgs
)

The custum interface package in my case is the reconstruction_msgs

Edit: Also make sure your #include ends with .hpp

Have you added the new interfaces package to your ament_target_dependencies?

This is how my CMakeLists.txt looks like for a cpp executable:

...
find_package(reconstruction_msgs REQUIRED)
...

# Executables ------------------------------
add_executable(gp25_services_node
  src/ros_nodes/gp25_services_node.cpp
)
ament_target_dependencies( gp25_services_node
  rclcpp
  rclcpp_action
  moveit_ros_planning_interface
  reconstruction_msgs
)

The custom interface package in my case is the reconstruction_msgs.

Also make sure your #include ends with .hpp.

added 58 characters in body
Source Link

Have you added the new interfaces package to your ament_target_dependencies?

This is how my CMakeLists.txt looks like for a cpp executable:

...
find_package(reconstruction_msgs REQUIRED)
...

# Executables ------------------------------
add_executable(gp25_services_node
  src/ros_nodes/gp25_services_node.cpp
)
ament_target_dependencies( gp25_services_node
  rclcpp
  rclcpp_action
  moveit_ros_planning_interface
  reconstruction_msgs
)

The custum interface package in my case is the reconstruction_msgs

Edit: Also make sure your #include ends with .hpp

Have you added the new interfaces package to your ament_target_dependencies?

This is how my CMakeLists.txt looks like for a cpp executable:

...
find_package(reconstruction_msgs REQUIRED)
...

# Executables ------------------------------
add_executable(gp25_services_node
  src/ros_nodes/gp25_services_node.cpp
)
ament_target_dependencies( gp25_services_node
  rclcpp
  rclcpp_action
  moveit_ros_planning_interface
  reconstruction_msgs
)

The custum interface package in my case is the reconstruction_msgs

Have you added the new interfaces package to your ament_target_dependencies?

This is how my CMakeLists.txt looks like for a cpp executable:

...
find_package(reconstruction_msgs REQUIRED)
...

# Executables ------------------------------
add_executable(gp25_services_node
  src/ros_nodes/gp25_services_node.cpp
)
ament_target_dependencies( gp25_services_node
  rclcpp
  rclcpp_action
  moveit_ros_planning_interface
  reconstruction_msgs
)

The custum interface package in my case is the reconstruction_msgs

Edit: Also make sure your #include ends with .hpp

Source Link

Have you added the new interfaces package to your ament_target_dependencies?

This is how my CMakeLists.txt looks like for a cpp executable:

...
find_package(reconstruction_msgs REQUIRED)
...

# Executables ------------------------------
add_executable(gp25_services_node
  src/ros_nodes/gp25_services_node.cpp
)
ament_target_dependencies( gp25_services_node
  rclcpp
  rclcpp_action
  moveit_ros_planning_interface
  reconstruction_msgs
)

The custum interface package in my case is the reconstruction_msgs