We are required to implement the forward kinematics (FK) and inverse kinematics (IK) functions for a 6-degree-of-freedom robot arm. Besides, you need to answer questions about the robot manipulation framework developed in this homework.
There are three main tasks:
● Implement the forward kinematics function.
● Implement the inverse kinematics function.
● Using your IK implementation in the Transporter Network block insertion
task.
We will use the PyBullet simulator for this homework. The robot arm used in
this homework is ur5, which is a 6-degree-of-freedom robot arm (containing 6
revolute joints).
- Create and activate Conda environment, then install GCC and Python packages.
git pull
cd hw4
cd ravens
conda create --name pdm-hw4 python=3.7 -y
conda activate pdm-hw4
sudo apt-get update
sudo apt-get -y install gcc libgl1-mesa-dev
pip install -r requirements.txt
- Install GPU acceleration with NVIDIA CUDA 10.1 and cuDNN 7.6.5 for Tensorflow.
conda install cudatoolkit==10.1.243 -y
conda install cudnn==7.6.5 -y
python fk.py
pybullet build time: Sep 22 2020 00:55:20
current_dir=/home/hcis-s22/Desktop/PDMS-HW4_ANS/pybullet_robot_envs/envs/panda_envs
============================ Task 1 : Forward Kinematic ============================
- Testcase file : fk_test_case_ta1.json
- Your Score Of Forward Kinematic : 5.000 / 5.000, Error Count : 0 / 100
- Your Score Of Jacobian Matrix : 5.000 / 5.000, Error Count : 0 / 100
- Testcase file : fk_test_case_ta2.json
- Your Score Of Forward Kinematic : 5.000 / 5.000, Error Count : 0 / 100
- Your Score Of Jacobian Matrix : 5.000 / 5.000, Error Count : 0 / 100
====================================================================================
- Your Total Score : 20.000 / 20.000
====================================================================================
python ik.py
###################################### log #########################################
============================ Task 2 : Inverse Kinematic ============================
- Testcase file : ik_test_case_ta1.json
- Mean Error : 0.001048
- Error Count : 0 / 100
- Your Score Of Inverse Kinematic : 20.000 / 20.000
- Testcase file : ik_test_case_ta2.json
- Mean Error : 0.001482
- Error Count : 0 / 100
- Your Score Of Inverse Kinematic : 20.000 / 20.000
====================================================================================
- Your Total Score : 40.000 / 40.000
====================================================================================
Test your ik implementation in the Transporter Networks 's frame work by inferencing "Block Insertion Task" on a mini set of 10 testing data
Step 1. Download dataset at https://drive.google.com/file/d/1JrCyrvpi3XeuapfecHs1aVtcfRJWWRTV/view?usp=drive_link and put the whole block-insertion-easy-test/
folder under hw4/ravens/
Step 2. Download checkpoint at https://drive.google.com/file/d/1gEMNGTSXjMyvegp72ivbjCle0ntvcEVB/view?usp=drive_link and put the whole checkpoints/
folder under hw4/ravens/
Step 3. Testing the model and your ik implementation
cd ravens
CUDA_VISIBLE_DEVICES=-1 python ravens/test.py --assets_root=./ravens/environments/assets/ --disp=True --task=block-insertion-easy --agent=transporter --n_demos=1000 --n_steps=20000# No need to use GPU
###################################### log ###########################################
Loading pre-trained model at 20000 iterations.
============================ Task 3 : Transporter Network ============================
Test: 1/10
WARNING:tensorflow:From /home/hcis-s22/Desktop/PDMS-HW4_ANS/ravens/ravens/agents/transporter.py:167: set_learning_phase (from tensorflow.python.keras.backend) is deprecated and will be removed after 2020-10-11.
Instructions for updating:
Simply pass a True/False value to the `training` argument of the `__call__` method of your layer or model.
W1205 20:59:22.550236 139775920095872 deprecation.py:323] From /home/hcis-s22/Desktop/PDMS-HW4_ANS/ravens/ravens/agents/transporter.py:167: set_learning_phase (from tensorflow.python.keras.backend) is deprecated and will be removed after 2020-10-11.
Instructions for updating:
Simply pass a True/False value to the `training` argument of the `__call__` method of your layer or model.
Total Reward: 1.0 Done: True
Test: 2/10
Total Reward: 1.0 Done: True
Test: 3/10
Total Reward: 1.0 Done: True
Test: 4/10
Total Reward: 1.0 Done: True
Test: 5/10
Total Reward: 1.0 Done: True
Test: 6/10
Total Reward: 1.0 Done: True
Test: 7/10
Total Reward: 1.0 Done: True
Test: 8/10
Total Reward: 1.0 Done: True
Test: 9/10
Total Reward: 1.0 Done: True
Test: 10/10
Total Reward: 1.0 Done: True
====================================================================================
- Your Total Score : 10.000 / 10.000
====================================================================================