resibots / dynamixel_control_hw

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

Setting of LIBDYNAMIXEL in CMake #31

Open ssr-yuki opened 3 years ago

ssr-yuki commented 3 years ago

Hi, thank you for publishing great software.

I would like to ask you why you write CMake as the following: https://github.com/resibots/dynamixel_control_hw/blob/0d21d0da60a65af1fe3e1966bfdbec48b2be0f2f/CMakeLists.txt#L6

In this implementation,the right hand STREQUAL of https://github.com/resibots/dynamixel_control_hw/blob/0d21d0da60a65af1fe3e1966bfdbec48b2be0f2f/CMakeLists.txt#L25 always returns true in my understanding. So, even though I set LIBDYNAMIXEL as a environment variable, this cmake uses default settings if I do not set RESIBOTS_DIR.

I think it (Line 6) should be as the following.

set(LIBDYNAMIXEL "$ENV{LIBDYNAMIXEL}")

Regards.

5730289021-NN commented 3 years ago

I agree on this.

Furthermore, the default location at Line 26-27

https://github.com/resibots/dynamixel_control_hw/blob/0d21d0da60a65af1fe3e1966bfdbec48b2be0f2f/CMakeLists.txt#L25-L27

should be

message("Using default location for libdynamixel : /usr/local/") set(libdynamixel_dir "/usr/local/")

instead since the default install location is at there.

Cheers