- Project by: Omkar Vilas Bhoite
- Advised and Guided by: Prof. Jorg Conradt & Juan Pablo Romero Bermudez
ROS, and to install it please follow the instruction from this link "https://wiki.ros.org/ROS/Installation". "In my case I am using ROS Noetic"
[1]. Downlaod the Dynamixel SDK from https://github.com/ROBOTIS-GIT/DynamixelSDK.git and install the one for ros version. Or the shortest way to install library is by using the following command. (Make sure to put the correct ROS-DISTRO.)
$ sudo apt-get install ros-{$ros_distro}-dynamixel-sdk*
[3]. Open the file named multi_motor.cpp in Multi_Motor and provide the path to the dynamixel library installed on you computer. The path maybe similar to like one I use but your distro might be different. (Look for #include </opt/ros/noetic/include/dynamixel_sdk/dynamixel_sdk.h> and update it with your path)
/opt/ros/noetic/include/dynamixel_sdk
/opt/ros/{$ros_distro}/include/dynamixel_sdk
Also, make sure to check for the USB port and add the following in to the .cpp file. You can check to which port you are connected to using following command. (Look for #define DEVICE_NAME "/dev/ttyACM0" and change the port as per your port name, it maybe USB* or ACM*)
$ ls /dev/tty*
You can check if the user is in the dialout group using the following command (Where "username" is what you have to change as per the user)
$ id username
If serial port is not opening then there is chance that the user is not added to the dialout group, and to add user to dialout group use the following command (this is optional, just in case you are not able to open the port)
$ sudo usermod -a -G dialout <username>
Now we need to make sure that we have access to the port and for that we need to give the port acccess to read and write, and to achieve that us the following command. Where the asterick in " /dev/tty* " corresponds to USB or ACM which you can verify using the above command.
$ sudo chmod a+rw /dev/tty*
$ cd Multi_Motor/
$ catkin_make
$ source devel/setup.bash
[5]. Open 3 new terminals. (Make sure that you are in the same folder where you performed the step 3)
$ source devel/setup.bash
$ roscore
$ source devel/setup.bash
$ rosrun multi_motor multi_motor
$ source devel/setup.bash
$ python3 src/multi_motor/src/run.py
Note : You can also eliminate retyping the "$ source devel/setup.bash" command, by adding it in the .bashrc file. To do so you need to follow the commands
$ code ~/.bashrc
source ~/KTH-Neuro-Computing-Systems/Multi_Motor/devel/setup.bash