Lab 6: Arm Kinematics in the Physical Robot - GIXLabs/TECHIN516 GitHub Wiki

1. Connecting to the Physical Robot

We have used the Kinova robotic arm in simulation in the previous lab. Today we will have the opportunity to familiarize ourselves with the actual physical robot. Connecting works slightly differently than using the Turtlebots, you do not need to ssh in, run a bringup script, or run a discovery server as the robot arm is constantly listening for commands when turned on.

  1. Turn the robot on, wait a few seconds for the back light to turn green.

  2. Connect your laptop's ROS environment to the robot arm:

    ros2 launch kortex_bringup gen3_lite.launch.py \
    robot_ip:=<ip.of.the.arm> \
    launch_rviz:=false
    
  3. Launch MoveIt's planning server and Rviz:

    ros2 launch kinova_gen3_lite_moveit_config robot.launch.py \
    robot_ip:=<ip.of.the.arm>
    

Note: Please be mindful while using the physical robot. Make movements short and slow. Keep yourself out of the taped-off area. Turn the robot off if it runs into the table so you can physically reset it. There are no protections inherently built into the hardware to disallow it from hurting you or itself so please be careful.

2. Change the Robot's Pose in Cartesian Space

We will now repeat similar exercises to the previous lab, but you will get a sense for how the real robot arm moves.

  1. Use the interactive markers in Rviz to slowly navigate the arm to the (x=4, y=6) position of the grid sheet on the table; set the z position to roughly 15cm.

    Deliverables

    2.1: Report the pose of the end-effector.

    2.2: Report the set of joint angles that match this pose.

    2.3: The grid on the table is 5cm x 5cm per square. Determine the transformation between the end-effector's reference frame and the grid.

    2.4: Take photos of the robot in this position, one from above, and another from over its shoulder.

3. Change the Robot's Pose in Configuration Space

  1. Use the joints tab in Rviz to set the robot's joints to the following values:

    1 2 3 4 5 6
    17 340 134 270 338 290
    357 21 150 272 320 273

    Deliverable 3.1: For each set of joint values, estimate the coordinates of the table grid the end-effector is above.

4. Pick Up the Cube

You can choose either method you have learned to finish the deliverables in this section. It is good practice to perform robot tasks manually at first in order to understand the steps and considerations involved before automation.

  1. Control the robot arm to pick up a 3D printed cube from the grid. Open and close the gripper using the joints tab in Rviz or the following commands:

    Deliverables:

    4.1: Take a video of the robot arm picking up the cube

    4.2: Select (and report) a percentage for the relative position of the gripper. Additionally, report the end_effector's pose.

5. Planning Scene Objects in MoveIt

We will go through the steps of adding an object to our planning scene, which in turn will serve as a constraint when MoveIt's motion planning is creating safe trajectories for the robot to reach different positions. This section should be conduct only in simulation.

  1. Stop the current robot connection and MoveIt server and relaunch everything in simulation as before:

    ros2 launch kortex_bringup kortex_sim_control.launch.py \
    sim_ignition:=false \
    sim_gazebo:=true \
    robot_type:=gen3_lite \
    robot_name:=gen3_lite \
    dof:=6 \
    gripper:=gen3_lite_2f \
    launch_rviz:=false
    
    ros2 launch kinova_gen3_lite_moveit_config sim.launch.py 
    
  2. Using the Rviz tab called Scene Objects, select a "Box" with dimensions 1m for all three axes (x, y, z). Change the position values to the ones on the picture below (x=0.6, y=0.5, z-0.4) to set the scene object a little above the table level in the physical world. Tick the box next to Box_0 name (you may rename it), to attach the object to the base_link.

  3. Finally, publish the changes made so the move_group instance saves the changes to include in planning stages.

  4. Use the interactive markers to move the gripper towards the planned scene object.

    Deliverables:

    5.1: Describe what you see in terms of pieces of the robot changing colors.

    5.2: Hit the plan button (not execute) and report on any changes in the terminal or the status in the Planning tab.