Skip to content

Robotica-UNAL-G3-A/robotics_lab4

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robotic's lab 4: Direct kinematics

This repo contains the implementation of the solution to the movement control of Phantom X Pincher. This robot has Dynamixel AX-12 motor as an actuators. To use them the dynamixel wizard is recommended and the ros-noetic-dynamixel-workbench is requiered to use them with ROS. This repo is build in the form of a ROS package.

About the robotics-lab4 ROS package

This is package inspired by (blantenly stolen from) the one-motor-repo1 and the px repo[^px repo]. Getting these package would be helpful. After getting them and locating them at catkin/src.

Test if they are correctly working.

roslaunch -v px_robot px_rviz.launch 
roslaunch dynamixel_one_motor one_controller.launch 

To run this package use the following command

roslaunch robotics-lab4 dynamixel_control.launch 

Setup

Software configuration

sudo apt install ros-noetic-dynamixel-workbench

Connections

At the lab you are provided with a kit with:

  • The pincher x robot
  • A FTDI interface
  • A USB cable extender
  • Power supply

1 Connect the FTDI to your computer, ensure that is set up to TTL mode. 2 Check it is being detected ls /dev/ttyU* and set the necessary permissions (only the first tiem). 3 Power up the robot by connecting the power supply to the power jack of the multi connector adapter 4 Connect the FTDI to the multi connector adapter through any of the available port 5 Use Dynamixel wizard to check the motors are working correctly

Troubleshooting

  • If after following the steps in the guide2 you have trouble and the motors are not recognize on the Dynamixel wizard. check the cable connection.

  • Check Again if the USB is being detected and what permission does it has by running `ls -la /dev/ttyU*

  • If problems remain, try disconnecting one of the motor separating it from the reset (out of the daisy chain) and connect it directly to the multi connector adapter. Check if now it is recognized. If the motors have the same ID number they enter into conflict and won't be recognized by the wizard if there is more than one motor with the same ID connected at the same time3. to solve this, change the ID to a unique value of each of the motors one at the time using the packets tools. This tool allows to communicate with the motor and send commands such as write to registers. Write to register 3 the idea you selected(data length of 1). Other alternative is by following the post referenced below [id-setting].

Using Docker

USB

install usbipd in the host machine. And follow the instructions

inside the wsl instance

sudo apt install linux-tools-virtual hwdata
sudo update-alternatives --install /usr/local/bin/usbip usbip `ls /usr/lib/linux-tools/*/usbip | tail -n1` 20
usbipd wsl --help
usbipd wsl list
usbipd wsl attach --busid=<BUSID>

Direct Kinematics

To begin constructing the direct kinematics, we must first define the home position. To simplify the process, we align the robot in a straight position.

Once the home position is defined, we proceed with the following steps:

  • Define an axis for each articulation.
  • Construct perpendicular lines that are shared by each pair of articulations.
  • Define a z-axis for each axis.
  • Define an x-axis along the perpendicular lines, following the DH-hypothesis.

The resulting schematics:

capture robotStudio signal creation

Using the axis systems, we create the DH-table.

capture robotStudio signal creation

Positions

Here we can compare the theorical position and the position made by the robot.

Estimated toolbox position Real robot position
Position 1: Home Position The q values: [0, 0, 0, 0, 0]
notebook cover notebook cover
Position 2 The q values: [-25, 15, -20, 20, 0]
notebook cover notebook cover
Position 3 The q values: [35,-35, 30, -30, 0]
robot P3 notebook cover
Position 4 The q values: [-85, 20, -55, 17, 0]
robot P3 notebook cover
Position 5 The q values: [-80, 35, -55, 45, 0]
robot P3 notebook cover

Video: Robot and interface working

Alt text

Conclusions

  • Learning to use RQT (tools from ROS for GUI) was a important challenge during the practice.
  • We explore another tools to simplify the development of the GUI (in this case QT Framework).

Contributors

Reference

Footnotes

  1. dynamixel one motor [^px repo]: px repo

  2. Lab guide

  3. dynamixel troubleshooting video

About

Control joint movement of the Phantom X Pincher robot

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published