K Anup Pai
Published

Lunar Arm: Kinematic Control design and Analysis

Use genuine moon data to train the AI of the lunar robot! It uses ROS2 to prepare and avoid obstacles for future space exploration.

IntermediateWork in progressOver 25 days1,063
Lunar Arm: Kinematic Control design and Analysis

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
UDOO Camera Module
UDOO Camera Module
×1

Software apps and online services

MATLAB
MATLAB
RoboDK
keyshot

Hand tools and fabrication machines

Drill / Driver, Cordless
Drill / Driver, Cordless
Hot glue gun (generic)
Hot glue gun (generic)
Soldering Station, 110 V
Soldering Station, 110 V
Solder Wire, Lead Free
Solder Wire, Lead Free

Story

Read more

Custom parts and enclosures

Robotic Design

This is the final design for the robotic Manipulator that we intend on using further, Optimization for the design is made and the results are satisfactory

Robotic design Drawing sheet

This Sheet is the blueprint for manufacturing the design

Schematics

Robot control schematic

Inorder to create a prototyope we created a simple Robotic manipulator running off an Arduino UNO

Sectional View of the Servo/ Stepper motor

This file helps us to understand the Sectional view of the robotic arm and understand the placement of the servos or stepper motors being used.

Code

URDF for robotic arm

XML
This is a URDF code which we used for the testing in ROS2, Initially we used a 3DOF robotic arm to begin the testing and are currently still stuck at the optimization, further on we shall try out with 5 DOF robotic Arm as well.
<?xml version="1.0" encoding="utf-8"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) 
     Commit Version: 1.6.0-4-g7f85cfe  Build Version: 1.6.7995.38578
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot
  name="Assem1">
  <link
    name="base_link">
    <inertial>
      <origin
        xyz="-0.00251446002835114 -0.00910274977624806 0.00930455495699778"
        rpy="0 0 0" ></origin>
      <mass
        value="5.05654866776462" ></mass>
      <inertia
        ixx="0.416700428656306"
        ixy="-4.32978610489403E-20"
        ixz="-2.02384405530627E-17"
        iyy="0.833358780233827"
        iyz="-1.22334969149059E-19"
        izz="0.416700428656306" ></inertia>
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" ></origin>
      <geometry>
        <mesh
          filename="package://Assem1/meshes/base_link.STL" ></mesh>
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" ></origin>
      <geometry>
        <mesh
          filename="package://Assem1/meshes/base_link.STL" ></mesh>
      </geometry>
    </collision>
  </link>
  <link
    name="base upper">
    <inertial>
      <origin
        xyz="-0.0248799781249181 0.0595719847655025 -9.22001076701651E-08"
        rpy="0 0 0" ></origin>
      <mass
        value="0.17975206887673" ></mass>
      <inertia
        ixx="0.000150393233089808"
        ixy="1.61490457448352E-06"
        ixz="1.22577960971961E-10"
        iyy="0.000110782668404665"
        iyz="-1.27707816521107E-11"
        izz="0.000113874316246099" ></inertia>
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" ></origin>
      <geometry>
        <mesh
          filename="package://Assem1/meshes/base upper.STL" ></mesh>
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" ></origin>
      <geometry>
        <mesh
          filename="package://Assem1/meshes/base upper.STL" ></mesh>
      </geometry>
    </collision>
  </link>
  <joint
    name="rotating1"
    type="revolute">
    <origin
      xyz="-0.0025145 -0.0093046 0.013257"
      rpy="1.5708 0 3.1416" ></origin>
    <parent
      link="base_link" ></parent>
    <child
      link="base upper" ></child>
    <axis
      xyz="0 1 0" ></axis>
    <limit
      lower="0"
      upper="0"
      effort="0"
      velocity="0" ></limit>
  </joint>
  <link
    name="upper line">
    <inertial>
      <origin
        xyz="1.90819582357449E-16 0.0415003031125783 -0.175"
        rpy="0 0 0" ></origin>
      <mass
        value="1.24856818796039" ></mass>
      <inertia
        ixx="0.0272444827700386"
        ixy="9.67108026478024E-20"
        ixz="2.71050543121376E-17"
        iyy="0.0272505671890494"
        iyz="-2.35087387490933E-18"
        izz="0.000875719560286572" ></inertia>
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" ></origin>
      <geometry>
        <mesh
          filename="package://Assem1/meshes/upper line.STL" ></mesh>
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" ></origin>
      <geometry>
        <mesh
          filename="package://Assem1/meshes/upper line.STL" ></mesh>
      </geometry>
    </collision>
  </link>
  <joint
    name="rotating2"
    type="revolute">
    <origin
      xyz="0.04 0.06 0"
      rpy="0 1.2689 -1.5708" ></origin>
    <parent
      link="base upper" ></parent>
    <child
      link="upper line" ></child>
    <axis
      xyz="0 1 0" ></axis>
    <limit
      lower="0"
      upper="0"
      effort="0"
      velocity="0" ></limit>
  </joint>
  <link
    name="upper holder">
    <inertial>
      <origin
        xyz="-0.00249578339288004 0.0157997485505612 0.0776404779597654"
        rpy="0 0 0" ></origin>
      <mass
        value="0.600752275490035" ></mass>
      <inertia
        ixx="0.0043317816510292"
        ixy="-8.69583879383647E-06"
        ixz="0.000120259918899327"
        iyy="0.00363079250672205"
        iyz="0.000270515895786707"
        izz="0.00140856272750615" ></inertia>
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" ></origin>
      <geometry>
        <mesh
          filename="package://Assem1/meshes/upper holder.STL" ></mesh>
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" ></origin>
      <geometry>
        <mesh
          filename="package://Assem1/meshes/upper holder.STL" ></mesh>
      </geometry>
    </collision>
  </link>
  <joint
    name="rotating3"
    type="revolute">
    <origin
      xyz="0 0 -0.35"
      rpy="-3.1416 -0.45671 0" ></origin>
    <parent
      link="upper line" ></parent>
    <child
      link="upper holder" ></child>
    <axis
      xyz="0 1 0" ></axis>
    <limit
      lower="0"
      upper="0"
      effort="0"
      velocity="0" ></limit>
  </joint>
  <link
    name="holder">
    <inertial>
      <origin
        xyz="0.0489702908769923 0.00950000000000006 -1.11022302462516E-16"
        rpy="0 0 0" ></origin>
      <mass
        value="0.88615781631058" ></mass>
      <inertia
        ixx="0.000713451704325079"
        ixy="-3.77912275790223E-19"
        ixz="1.84314369322536E-18"
        iyy="0.00274635153308726"
        iyz="-3.16488795512668E-21"
        izz="0.00266974086119314" ></inertia>
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" ></origin>
      <geometry>
        <mesh
          filename="package://Assem1/meshes/holder.STL" ></mesh>
      </geometry>
      <material
        name="">
        <color
          rgba="0.792156862745098 0.819607843137255 0.933333333333333 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" ></origin>
      <geometry>
        <mesh
          filename="package://Assem1/meshes/holder.STL" ></mesh>
      </geometry>
    </collision>
  </link>
  <joint
    name="gripper"
    type="fixed">
    <origin
      xyz="0 0 0.15"
      rpy="0 -0.41953 0" ></origin>
    <parent
      link="upper holder" ></parent>
    <child
      link="holder" ></child>
    <axis
      xyz="0 0 0" ></axis>
  </joint>
</robot>

Gazebo Launch file

Python
We were just able to view the model in Gazebo and we have created a launch file for the same
import os
from launch_ros.actions import Node
from launch import LaunchDescription
from launch.substitutions import Command
from launch.actions import ExecuteProcess
from ament_index_python.packages import get_package_share_directory


def generate_launch_description():
    # robot model to option m1013 or a0912

    robot_model = 'a0912'
    # robot_model = 'm1013'

    xacro_file = get_package_share_directory('my_doosan_pkg') + '/description' + '/xacro/' + robot_model + '.urdf.xacro'

    # Robot State Publisher
    robot_state_publisher = Node(package='robot_state_publisher',
                                 executable='robot_state_publisher',
                                 name='robot_state_publisher',
                                 output='both',
                                 parameters=[{'robot_description': Command(['xacro', ' ', xacro_file])
                                              }])

    # Spawn the robot in Gazebo
    spawn_entity_robot = Node(package='gazebo_ros',
                              executable='spawn_entity.py',
                              arguments=['-entity', 'my_doosan_robot', '-topic', 'robot_description'],
                              output='screen')

    # Start Gazebo with my empty world
    world_file_name = 'my_empty_world.world'
    world = os.path.join(get_package_share_directory('my_doosan_pkg'), 'worlds', world_file_name)
    gazebo_node = ExecuteProcess(cmd=['gazebo', '--verbose', world, '-s', 'libgazebo_ros_factory.so'], output='screen')

    return LaunchDescription([robot_state_publisher, spawn_entity_robot, gazebo_node])

Credits

K Anup Pai

K Anup Pai

1 project • 1 follower

Comments