6-DoF manipulation refers to the control of a robotic arm with six degrees of freedom. These six degrees of freedom are typically associated with the ability to move in three translational directions (X, Y, Z) and three rotational directions (roll, pitch, yaw).
Manipulation planning involves determining a sequence of robot configurations (joint angles and positions) to achieve a desired task or goal. It encompasses path planning, collision detection, and motion control.
Motion planning is the process of finding a collision-free path for the robot's end-effector (gripper) to move from an initial pose to a goal pose while avoiding obstacles in the environment.
Inverse kinematics is the mathematical problem of determining the joint angles of a robot to achieve a desired end-effector pose. It is a crucial component of manipulation planning for 6-DoF arms.
Serial / Chain Manipulators: CREATING A WORKSPACE AND PUBLISHER : $ mkdir -p robotic_arm_ws/src
, where src
will contain all the packages. Then $ cd robotic_arm_ws/
> $ colcon build
. It will create build
, install
and log
directories.
A trivial workspace might look like:
workspace_folder/
src/
cpp_package_1/
CMakeLists.txt
include/cpp_package_1/
package.xml
src/
py_package_1/
package.xml
resource/py_package_1
setup.cfg
setup.py
py_package_1/
...
cpp_package_n/
CMakeLists.txt
include/cpp_package_n/
package.xml
src/
Create a ros2 python package: $ ros2 pkg create --build-type ament_python <package_name>
and $ ros2 pkg create --build-type ament_python --node-name my_node my_package
. To build package, go outside src
: $ colcon build
and to build a single package : $ colcon build --packages-select my_package
. To use package: $ ros2 run my_package my_node
. To link package with install/setup.sh
: $ source install/setup.bash
. In bashrc add : source ~/robotic_arm_ws/install/setup.bash
.
my_package/
package.xml
resource/my_package
setup.cfg
setup.py
my_package/
we write Robot Design with URDF : Unified Robotics Description Format
: $ mkdir urdf
> $ touch r6dof. urdf
: [ 6dof_robot.urdf ]. Here is how our arm looks:
Rviz simulation of robot described by URDF :
Create a new folder launch
and $ touch rvizlaunch.py
: [ rvizlaunch.py ] . The setup.py file links the share folder of package and we must import as :
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('share/' + package_name, ['package.xml']),
(os.path.join('share', package_name,'launch'), glob('launch/*')),
(os.path.join('share', package_name,'urdf'), glob('urdf/*')),
(os.path.join('share', package_name,'config'), glob('config/*')),
],
Do a $ colcon build
and $ ros 2 launcg 6dof_robot rvirlaunch.py
ROS2 Control: Joint Trajectory Controller
We create $ mkdir config
> $ touch jtc.yaml
: [jtc.yaml and define the controller path in $ 6dof_robot.urdf
. Node communication with Joint Trajectory Controller : $ touch controllerlaunch.py
: [ controllerlaunch.py ].