ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Dynamixel Workbench Installation Error

asked 2022-09-19 06:34:21 -0600

Renox gravatar image

updated 2022-09-19 07:35:09 -0600

ravijoshi gravatar image

I run make in accordance with the Section 3.3.3.Setup DYNAMIXEL Workbench library.

But, I got the following error.

user@user:~/dyna_ws/src/my_dyna_pkgs/dynamixel-workbench/dynamixel_workbench_toolbox/examples/build$ make
[  2%] Building CXX object CMakeFiles/dynamixel_workbench.dir/home/rentaro/dyna_ws/src/my_dyna_pkgs/dynamixel-workbench/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp.o
In file included from /home/rentaro/dyna_ws/src/my_dyna_pkgs/dynamixel-workbench/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp:19:
/home/rentaro/dyna_ws/src/my_dyna_pkgs/dynamixel-workbench/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/../../include/dynamixel_workbench_toolbox/dynamixel_driver.h:29:12: fatal error: dynamixel_sdk/dynamixel_sdk.h: No such file or directory
   29 |   #include "dynamixel_sdk/dynamixel_sdk.h"
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/dynamixel_workbench.dir/build.make:76: CMakeFiles/dynamixel_workbench.dir/home/rentaro/dyna_ws/src/my_dyna_pkgs/dynamixel-workbench/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:162: CMakeFiles/dynamixel_workbench.dir/all] Error 2
make: *** [Makefile:84: all] Error 2

Please tell me how to run completely.

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2022-09-19 07:34:02 -0600

ravijoshi gravatar image

updated 2022-09-19 23:05:49 -0600

Please pay attention to the following error taken from the question:

In file included from /home/rentaro/dyna_ws/src/my_dyna_pkgs/dynamixel-workbench/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/dynamixel_driver.cpp:19:
/home/rentaro/dyna_ws/src/my_dyna_pkgs/dynamixel-workbench/dynamixel_workbench_toolbox/src/dynamixel_workbench_toolbox/../../include/dynamixel_workbench_toolbox/dynamixel_driver.h:29:12: fatal error: dynamixel_sdk/dynamixel_sdk.h: No such file or directory
   29 |   #include "dynamixel_sdk/dynamixel_sdk.h"
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

It can not find dynamixel_sdk. Therefore, you need to install it. There are various ways to install it. Since the question is for ROS Noetic, please remember to adapt commands to your ROS distro. Let's discuss them below:

Install from Source

  1. Get the source code of DynamixelSDK.

    ravi@dell:~$ mkdir dynamixel
    ravi@dell:~$ cd dynamixel/
    ravi@dell:~/dynamixel$ git clone --branch noetic-devel https://github.com/ROBOTIS-GIT/DynamixelSDK.git
    Cloning into 'DynamixelSDK'...
    remote: Enumerating objects: 13727, done.
    remote: Counting objects: 100% (1101/1101), done.
    remote: Compressing objects: 100% (486/486), done.
    remote: Total 13727 (delta 539), reused 1047 (delta 524), pack-reused 12626
    Receiving objects: 100% (13727/13727), 28.50 MiB | 5.84 MiB/s, done.
    Resolving deltas: 100% (7787/7787), done.
    
  2. Compile the source code. Here I am compiling 64 bit version.

    ravi@dell:~/dynamixel$ cd DynamixelSDK/c++/build/linux64
    ravi@dell:~/dynamixel/DynamixelSDK/c++/build/linux64$ make
    mkdir -p ./.objects/
    g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/group_bulk_read.cpp -o .objects/group_bulk_read.o
    ../../src/dynamixel_sdk/group_bulk_read.cpp: In member function ‘bool dynamixel::GroupBulkRead::getError(uint8_t, uint8_t*)’:
    ../../src/dynamixel_sdk/group_bulk_read.cpp:235:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
      235 |   return error[0] = error_list_[id][0];
          |          ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
    g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/group_bulk_write.cpp -o .objects/group_bulk_write.o
    g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/group_sync_read.cpp -o .objects/group_sync_read.o
    ../../src/dynamixel_sdk/group_sync_read.cpp: In member function ‘bool dynamixel::GroupSyncRead::getError(uint8_t, uint8_t*)’:
    ../../src/dynamixel_sdk/group_sync_read.cpp:204:19: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
      204 |   return error[0] = error_list_[id][0];
          |          ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
    g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/group_sync_write.cpp -o .objects/group_sync_write.o
    g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/packet_handler.cpp -o .objects/packet_handler.o
    g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/port_handler.cpp -o .objects/port_handler.o
    g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/protocol1_packet_handler.cpp -o .objects/protocol1_packet_handler.o
    g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/protocol2_packet_handler.cpp -o .objects/protocol2_packet_handler.o
    g++ -O2 -O3 -DLINUX -D_GNU_SOURCE -Wall -c -I../../include/dynamixel_sdk -m64 -fPIC -g -c ../../src/dynamixel_sdk/port_handler_linux.cpp -o .objects/port_handler_linux.o
    g++ -shared -fPIC -m64 -o ./libdxl_x64_cpp.so ./.objects/group_bulk_read.o ./.objects/group_bulk_write.o ./.objects/group_sync_read.o ./.objects/group_sync_write.o ./.objects ...
(more)
edit flag offensive delete link more

Comments

Thank you for your reply. I run "sudo apt-get install ros-noetic-dynamixel-sdk" you showed, but I got the same error. I was doing "git clone" dynamixelsdk library in accordance with e-Manual and got an error. I may have misplaced the library. Where should I put dynamixelsdk library?

Renox gravatar image Renox  ( 2022-09-19 11:55:20 -0600 )edit

I have installed it successfully. Please check the updated answer. Let me know if the problem persists.

ravijoshi gravatar image ravijoshi  ( 2022-09-19 23:08:33 -0600 )edit

Thank you for your reply. I could compile. I have one more question. Where should I put dynamixel-workbench-msgs of e-Manual? Is it same place as dynamixel-workbench? Best regards.

Renox gravatar image Renox  ( 2022-09-22 23:46:37 -0600 )edit

Where should I put dynamixel-workbench-msgs of e-Manual?

The ROBOTIS-GIT/dynamixel-workbench and ROBOTIS-GIT/dynamixel-workbench-msgs are ROS packages. So both of them should be inside a ROS workspace. In my answer above, I kept the "dynamixel-workbench" inside a regular directory to show you the make command (as it was the original question).

Finally, if this information was helpful, do not forget to upvote and mark it as correct to accept this answer, please.

ravijoshi gravatar image ravijoshi  ( 2022-09-23 00:17:22 -0600 )edit

Thank you so much.

Renox gravatar image Renox  ( 2022-09-23 04:36:14 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-09-19 06:34:21 -0600

Seen: 1,098 times

Last updated: Sep 19 '22