resibots / dynamixel_control_hw

Hardware interface for ros_control and the Dynamixels actuators
Other
60 stars 22 forks source link

Compiling XL branch #28

Open mrunaljsarvaiya opened 4 years ago

mrunaljsarvaiya commented 4 years ago

I have a dynamixel XL430-W250 and ran into issues compiling this package (branch: XL). Is this expected or is that branch tested with the appropriate dynamixels?

dogoepp commented 4 years ago

Firstly, we have not had all variants of XL actuators, so we have not had the possibility to check that the library behaves as expected with all models. As far as I remember, we did not test for XL430-W250. Once we get the compilation to work, I would welcome feedback from you with your actuators.

Currently, the XL branch is incomplete. @PedroDesRobots should be able to tell us whether it should nonetheless work and under which conditions.

In the meantime, would you mind to share the compilation errors ? I might be able to help with this information alone, as I currently lack the setup to test the code.

mrunaljsarvaiya commented 4 years ago

Here are the errors I get when I build my catkin workspace with dynamixel_control_hw branch XL and libdynamixel branch master (Seems like get_current_positions_XL and get_current_speed_XL are not defined )

/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp: In member function ‘virtual void dynamixel::DynamixelHardwareInterface<Protocol>::read(const ros::Time&, const ros::Duration&)’:
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:287:72: error: ‘class dynamixel::servos::Xl320’ has no member named ‘get_current_positions_XL’
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_positions_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                        ^
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:287:101: error: expected primary-expression before ‘>’ token
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_positions_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                                                     ^
In file included from /home/mrunal/catkin_ws/src/dynamixel_control_hw/src/dynamixel_control.cpp:38:0:
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:313:72: error: ‘class dynamixel::servos::Xl320’ has no member named ‘get_current_speed_XL’
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_speed_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                        ^
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:313:97: error: expected primary-expression before ‘>’ token
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_speed_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                                                 ^
In file included from /home/mrunal/catkin_ws/src/dynamixel_control_hw/src/dynamixel_control.cpp:38:0:
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp: In member function ‘virtual void dynamixel::DynamixelHardwareInterface<Protocol>::read(const ros::Time&, const ros::Duration&)’:
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:287:72: error: ‘class dynamixel::servos::Xl320’ has no member named ‘get_current_positions_XL’
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_positions_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                        ^
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:287:101: error: expected primary-expression before ‘>’ token
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_positions_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                                                     ^
In file included from /home/mrunal/catkin_ws/src/dynamixel_control_hw/src/dynamixel_control.cpp:38:0:
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:313:72: error: ‘class dynamixel::servos::Xl320’ has no member named ‘get_current_speed_XL’
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_speed_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                        ^
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:313:97: error: expected primary-expression before ‘>’ token
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_speed_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                                                 ^
In file included from /home/mrunal/catkin_ws/src/dynamixel_control_hw/src/hardware_interface.cpp:2:0:
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp: In member function ‘virtual void dynamixel::DynamixelHardwareInterface<Protocol>::read(const ros::Time&, const ros::Duration&)’:
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:287:72: error: ‘class dynamixel::servos::Xl320’ has no member named ‘get_current_positions_XL’
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_positions_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                        ^
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:287:101: error: expected primary-expression before ‘>’ token
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_positions_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                                                     ^
In file included from /home/mrunal/catkin_ws/src/dynamixel_control_hw/src/hardware_interface.cpp:2:0:
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:313:72: error: ‘class dynamixel::servos::Xl320’ has no member named ‘get_current_speed_XL’
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_speed_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                        ^
/home/mrunal/catkin_ws/src/dynamixel_control_hw/include/dynamixel_control_hw/hardware_interface.hpp:313:97: error: expected primary-expression before ‘>’ token
         _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_speed_XL<id_t>(_ids_vector)); //servos::Mx28
                                                                                                 ^
dynamixel_control_hw/CMakeFiles/dynamixel_hw.dir/build.make:62: recipe for target 'dynamixel_control_hw/CMakeFiles/dynamixel_hw.dir/src/hardware_interface.cpp.o' failed
make[2]: *** [dynamixel_control_hw/CMakeFiles/dynamixel_hw.dir/src/hardware_interface.cpp.o] Error 1
CMakeFiles/Makefile2:42621: recipe for target 'dynamixel_control_hw/CMakeFiles/dynamixel_hw.dir/all' failed
make[1]: *** [dynamixel_control_hw/CMakeFiles/dynamixel_hw.dir/all] Error 2

Edit : code block formatting instead of inline code

dogoepp commented 4 years ago

This is quite an unexpected error. Indeed, I do not expect these functions to exist, and cannot find them anyway anywhere in the libdynamixel. It might be on a branch that has not been pushed online. We will have to wait for @PedroDesRobots to be back.

Anyway, as far as I can read, the XL branch is hacky : the actuator model is hard-coded in the read function. I therefore expect it to having been published only for backup, or as preliminary work.

PedroDesRobots commented 4 years ago

Hi @mrunaljsarvaiya,

You should install libdynamixel on branch dev. Let me know if it works with that one.

mrunaljsarvaiya commented 4 years ago

@PedroDesRobots I'm on the dev branch on libdynamixel and XL branch on dynamixel_control_hw. When I run catkin_make I still get errors related to the functions below error: ‘class dynamixel::servos::Xl320’ has no member named ‘get_current_positions_XL’ _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_positions_XL<id_t>(_ids_vector)); //servos::Mx28

error: ‘class dynamixel::servos::Xl320’ has no member named ‘get_current_speed_XL’ _dynamixel_controller.send(std::make_shared<servos::Xl320>(0)->get_current_speed_XL<id_t>(_ids_vector)); //servos::Mx28