elpimous / Legged_Control

ylo2 quadruped controller
BSD 3-Clause "New" or "Revised" License
6 stars 3 forks source link

error: invalid use of non-static member function ‘void legged::Ylo2HW::ImuCallback(const ConstPtr&)’ #1

Closed elpimous closed 1 year ago

elpimous commented 1 year ago
/home/ylo2/catkin_ws/src/ylo2_legged_control/legged_control/ylo2_legged_hw/src/ylo2hw.cpp: In member function ‘virtual bool legged::Ylo2HW::init(ros::NodeHandle&, ros::NodeHandle&)’:
/home/ylo2/catkin_ws/src/ylo2_legged_control/legged_control/ylo2_legged_hw/src/ylo2hw.cpp:36:68: error: invalid use of non-static member function ‘void legged::Ylo2HW::ImuCallback(const ConstPtr&)’
   36 |   ros::Subscriber sub = root_nh.subscribe("imu/data", 100, Ylo2HW::ImuCallback);
      |                                                            ~~~~~~~~^~~~~~~~~~~
In file included from /home/ylo2/catkin_ws/src/ylo2_legged_control/legged_control/ylo2_legged_hw/src/ylo2hw.cpp:7:
/home/ylo2/catkin_ws/src/ylo2_legged_control/legged_control/ylo2_legged_hw/include/ylo2_legged_hw/ylo2hw.h:56:8: note: declared here
   56 |   void ImuCallback(const sensor_msgs::Imu::ConstPtr& imu_message);
elpimous commented 1 year ago

working.