This repository will help in kinematic and dynamic analysis of robotic systems. Some of the examples for solving forward and inverse position and velocity kinematics, forward and inverse dynamics simulations have been kept in the examples folder. User can take their help to simulate different robotic systems. In addition, it has capability to incorporate any control algorithm and trajectory planner with utmost ease. Computed torque control and impedence control has been implemented as an example.
To make the program easy to use, RobotController
class has been written to perform all kind of simulations. The class has folllowing inputs:
1. robot_type: specify urdf file initials eg. if urdf file name is 'ur5.urdf', specify 'ur5'
2. controllable_joints: joint indices of controllable joints. If not specified, by default all joints indices except first joint (first joint is fixed joint between robot stand and base)
3. end-eff_index: specify the joint indices for end-effector link. If not specified, by default the last controllable_joints is considered as end-effector joint
4. time_Step: time step for simulation
The example for doing inverse dynamic simulation using this class is shown below:
robot = RobotController(robot_type='ur5')
robot.createWorld(GUI=True)
# Inverse dynamic simulation
# Input: numpy array of joint angles
thi = np.array([0, 0, 0, 0, 0, 0]) # initial joint angles
thf = np.array([-1.5, -1.0, 1.0, -1.57, -1.57, -1.57]) # final joint nagles
robot.setJointPosition(thi)
robot.doInverseDynamics(thi, thf)
1-link, 2-link, 3-link robots with rotary joints, Universal Robots UR5
The details regarding the various control techniques and their implementation in pybullet is available in appendix