This repository explains how to implement the LX-16A Python Library in ROS environment.
Download the following program and install it. Download from here
Once installed the program. Select the port and clic on "Open Port".
Connect one motor at once. Assign an unique ID (per motor) and click on save.
1.- Clone your repo into your catkin workspace
cd ~/catkin_ws/src
git clone https://github.com/ShikurM56/lx-16a_ros.git
cd ~/catkin_ws/
catkin_make
2.- Go to your scripts folder, and be sure that angle_publisher.py and main.py are green color. It means that they are executable files.
cd ~/catkin_ws/src/lx-16a_ros/scripts/
ls
3.- If they aren't green color, change it:
cd ~/catkin_ws/src/lx-16a_ros/scripts/
sudo chmod +x angle_publisher.py
sudo chmod +x main.py
You can change the function servoMode to motorMode, and give a value from -1000 to 1000 to activate it.