Assignments for robotics motion planning and control module in the University of Birmingham (forward kinematics & inverse kinematics)
-
Install ROS 2 Development environment Install the Development Tools package:
sudo apt install ros-dev-tools ros-humble-ros2-control ros-humble-ros2-controllers ros-humble-ament-cmake
Installing the Desktop or Bare Bones should automatically source the ROS 2 environment but, under some circumstances you may need to do this again:
source /opt/ros/humble/setup.sh -
Create a ROS 2 Workspace:
mkdir -p ~/assignment1/src cd ~/assignment1 # not into src
-
Clone the Repositories:
git clone https://github.com/HyPAIR/RMPC_Assignment1.git src
-
Install the dependencies
vcs import src < src/franka.repos --recursive --skip-existing -
Detect and install project dependencies
rosdep install --from-paths src --ignore-src --rosdistro humble -y
-
Build
# use the --symlinks option to reduce disk usage, and facilitate development. colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF --executor sequential -
Adjust Enviroment
# Adjust environment to recognize packages and dependencies in your newly built ROS 2 workspace. source install/setup.sh
To visualize the arm and run the joint position controller, you can run with the following command.
ros2 launch franka_gazebo_bringup gazebo_joint_position_controller_example.launch.py load_gripper:=true franka_hand:='franka_hand'To test your forward kinmatics solution, you can run with the following command.
cd ~/assignment1/src/assignment
python3 forword_kinematics.pyTo test your inverse kinmatics solution, you can run with the following command.
cd ~/assignment1/src/assignment
python3 inverse_kinematics.py