ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Changing this
ament_target_dependencies(node_init
"rclcpp"
"ament_index_cpp"
"class_loader"
"rclcpp"
"rcutils"
)
to
ament_target_dependencies(node_init
"rclcpp"
"ament_index_cpp"
"class_loader"
"rcutils"
)
avoids the problem- ament_index_cpp and/or class_loader are dependent on rclcpp so their includes come first. That doesn't seem like a good requirement to have so alternatively I would have to bring in those two packages and anything else they depend on that also depend on rclcpp. ros2_ws sources for everything is easier and less error prone than that therefore https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/
2 | No.2 Revision |
Changing this
ament_target_dependencies(node_init
"rclcpp"
"ament_index_cpp"
"class_loader"
"rclcpp"
"rcutils"
)
to
ament_target_dependencies(node_init
"rclcpp"
"ament_index_cpp"
"class_loader"
"rcutils"
)
avoids the problem- ament_index_cpp and/or class_loader are dependent on rclcpp so their includes come first. That doesn't seem like a good requirement to have so alternatively I would have to bring in those two packages and anything else they depend on that also depend depends on rclcpp. ros2_ws sources for everything is easier and less error prone than that therefore https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/follow https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/ instead of any of this.
3 | No.3 Revision |
Changing this
ament_target_dependencies(node_init
"ament_index_cpp"
"class_loader"
"rclcpp"
"rcutils"
)
to
ament_target_dependencies(node_init
"rclcpp"
"ament_index_cpp"
"class_loader"
"rcutils"
)
avoids the problem- ament_index_cpp and/or class_loader are dependent on rclcpp so their includes come first. That doesn't seem like a good requirement to have so alternatively I would have to bring in sources of those two packages and anything else they depend on that also depends on rclcpp. ros2_ws sources for everything is easier and less error prone than that therefore follow https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/ instead of any of this.
4 | No.4 Revision |
Changing this
ament_target_dependencies(node_init
"ament_index_cpp"
"class_loader"
"rclcpp"
"rcutils"
)
to
ament_target_dependencies(node_init
"rclcpp"
"ament_index_cpp"
"class_loader"
"rcutils"
)
avoids the problem- ament_index_cpp and/or class_loader are dependent on rclcpp so their includes come first. That doesn't seem like a good requirement to have so alternatively I would have to bring in sources of those two packages and anything else they depend on that also depends on rclcpp. rclcpp- but that is too much work to do manually so ros2_ws sources for everything is easier and less error prone than that therefore follow https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/ instead of any of this.
5 | No.5 Revision |
Changing this
ament_target_dependencies(node_init
"ament_index_cpp"
"class_loader"
"rclcpp"
"rcutils"
)
to
ament_target_dependencies(node_init
"rclcpp"
"ament_index_cpp"
"class_loader"
"rcutils"
)
avoids the problem- ament_index_cpp and/or class_loader are dependent on rclcpp so their includes come first. That doesn't seem like a good requirement to have so alternatively I would have to bring in sources of those two packages and anything else they depend on that also depends on rclcpp- but that is too much work to do manually so ros2_ws sources for everything is easier and less error prone therefore prone, follow https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/ instead of any of this.
6 | No.6 Revision |
These steps don't solve the problem, only avoid it:
Changing this
ament_target_dependencies(node_init
"ament_index_cpp"
"class_loader"
"rclcpp"
"rcutils"
)
to
ament_target_dependencies(node_init
"rclcpp"
"ament_index_cpp"
"class_loader"
"rcutils"
)
avoids the problem- ament_index_cpp and/or class_loader are dependent on rclcpp so their includes come first. That doesn't seem like a good requirement to have so alternatively I would have to bring in sources of those two packages and anything else they depend on that also depends on rclcpp- but that is too much work to do manually so ros2_ws sources for everything is easier and less error prone, follow https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/ instead of any of this.
7 | No.7 Revision |
These steps options don't solve the problem, only avoid it:they are just workarounds:
Changing this
ament_target_dependencies(node_init
"ament_index_cpp"
"class_loader"
"rclcpp"
"rcutils"
)
to
ament_target_dependencies(node_init
"rclcpp"
"ament_index_cpp"
"class_loader"
"rcutils"
)
avoids the problem- ament_index_cpp and/or class_loader are dependent on rclcpp so their includes come first. That doesn't seem like a good requirement to have so alternatively I would have to bring in sources of those two packages and anything else they depend on that also depends on rclcpp- but that is too much work to do manually so ros2_ws sources for everything is easier and less error prone, follow https://index.ros.org/doc/ros2/Installation/Linux-Development-Setup/ instead of any of this.