Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in building forward_command_controller on ROS2_humble #26

Open
qq949718803 opened this issue Jul 20, 2023 · 1 comment
Open

Error in building forward_command_controller on ROS2_humble #26

qq949718803 opened this issue Jul 20, 2023 · 1 comment

Comments

@qq949718803
Copy link

/home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/src/forward_command_controller.cpp:121:7: error: ‘std::shared_ptr<rclcpp_lifecycle::LifecycleNode> controller_interface::ControllerInterfaceBase::node_’ is private within this context
121 | node_->get_logger(), "Expected %zu position command interfaces, got %zu", joint_names_.size(),
| ^~~~~
In file included from /opt/ros/humble/include/controller_interface/controller_interface.hpp:22,
from /home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/include/forward_command_controller/forward_command_controller.hpp:22,
from /home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/src/forward_command_controller.cpp:15:
/opt/ros/humble/include/controller_interface/controller_interface_base.hpp:227:52: note: declared private here
227 | std::shared_ptr<rclcpp_lifecycle::LifecycleNode> node_;
| ^~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/logging.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:40,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /opt/ros/humble/include/controller_interface/controller_interface_base.hpp:28,
from /opt/ros/humble/include/controller_interface/controller_interface.hpp:22,
from /home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/include/forward_command_controller/forward_command_controller.hpp:22,
from /home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/src/forward_command_controller.cpp:15:
/home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/src/forward_command_controller.cpp:121:7: error: ‘std::shared_ptr<rclcpp_lifecycle::LifecycleNode> controller_interface::ControllerInterfaceBase::node_’ is private within this context
121 | node_->get_logger(), "Expected %zu position command interfaces, got %zu", joint_names_.size(),
| ^~~~~
In file included from /opt/ros/humble/include/controller_interface/controller_interface.hpp:22,
from /home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/include/forward_command_controller/forward_command_controller.hpp:22,
from /home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/src/forward_command_controller.cpp:15:
/opt/ros/humble/include/controller_interface/controller_interface_base.hpp:227:52: note: declared private here
227 | std::shared_ptr<rclcpp_lifecycle::LifecycleNode> node_;
| ^~~~~
In file included from /opt/ros/humble/include/rclcpp/rclcpp/client.hpp:40,
from /opt/ros/humble/include/rclcpp/rclcpp/callback_group.hpp:24,
from /opt/ros/humble/include/rclcpp/rclcpp/any_executable.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategy.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/memory_strategies.hpp:18,
from /opt/ros/humble/include/rclcpp/rclcpp/executor_options.hpp:20,
from /opt/ros/humble/include/rclcpp/rclcpp/executor.hpp:37,
from /opt/ros/humble/include/rclcpp/rclcpp/executors/multi_threaded_executor.hpp:25,
from /opt/ros/humble/include/rclcpp/rclcpp/executors.hpp:21,
from /opt/ros/humble/include/rclcpp/rclcpp/rclcpp.hpp:155,
from /opt/ros/humble/include/controller_interface/controller_interface_base.hpp:28,
from /opt/ros/humble/include/controller_interface/controller_interface.hpp:22,
from /home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/include/forward_command_controller/forward_command_controller.hpp:22,
from /home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/src/forward_command_controller.cpp:15:
/home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/src/forward_command_controller.cpp: In member function ‘virtual controller_interface::return_type forward_command_controller::ForwardCommandController::update(const rclcpp::Time&, const rclcpp::Duration&)’:
/home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/src/forward_command_controller.cpp:154:34: error: ‘std::shared_ptr<rclcpp_lifecycle::LifecycleNode> controller_interface::ControllerInterfaceBase::node_’ is private within this context
154 | get_node()->get_logger(), *node_->get_clock(), 1000,
| ^~~~~
In file included from /opt/ros/humble/include/controller_interface/controller_interface.hpp:22,
from /home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/include/forward_command_controller/forward_command_controller.hpp:22,
from /home/yifei/ign_moveit2/ros2_controllers/forward_command_controller/src/forward_command_controller.cpp:15:
/opt/ros/humble/include/controller_interface/controller_interface_base.hpp:227:52: note: declared private here
227 | std::shared_ptr<rclcpp_lifecycle::LifecycleNode> node_;
| ^~~~~
gmake[2]: *** [CMakeFiles/forward_command_controller.dir/build.make:76:CMakeFiles/forward_command_controller.dir/src/forward_command_controller.cpp.o]

@AndrejOrsula
Copy link
Owner

Hello,

I can see that you are using humble, so that is probably the origin of the issue. As stated in README.md, this repository was developed and tested for galactic. Furthermore, this compilation error is unrelated to this repository and occurs in ros2_controllers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants