Mock hardware: two FR3 arms

This exercise uses the dual_fr3_cell. Both FR3 arms and both hands use mock_components/GenericSystem: all movement is simulated by ros2_control, with no physical robot or MoveIt process required.

You will start the mock cell, inspect its two arm controllers, watch a joint in RViz and PlotJuggler, and send an absolute seven-joint target to the left arm. The right arm is a follow-up exercise. The next exercise, Mock or real: a UR arm, repeats the same steps with a UR arm, mock or real.

Before you start

Use a ROS 2 Jazzy workspace with dual_fr3_cell, example_table_description, franka_description at the version pinned in dual_fr3_cell/dependencies.repos, and ros2_control_python_capabilities_demo. In this workspace, the pinned franka_description version is 2.9.0.

From the root of your workspace, build and source the packages:

source /opt/ros/jazzy/setup.bash
colcon build --packages-up-to dual_fr3_cell_bringup ros2_control_python_capabilities_demo
source install/setup.bash

Use a separate ROS domain for this exercise so a concurrently running real robot’s /controller_manager cannot be confused with the mock one. In every terminal used below, run from the root of your workspace:

source install/setup.bash
export ROS_DOMAIN_ID=83

Use another free domain number if 83 is already in use, but keep the same number in every workshop terminal.

1. Start the mock cell

In terminal A:

ros2 launch dual_fr3_cell_bringup bringup.launch.py

This launch starts robot_state_publisher, the ros2_control controller manager, joint_state_broadcaster, and four controllers: left_arm_controller, right_arm_controller, left_hand_controller, and right_hand_controller. The hardware in the generated URDF is mock_components/GenericSystem.

The bringup does not start RViz. In terminal B, open RViz with the cell’s config file:

ros2 run rviz2 rviz2 -d "$(ros2 pkg prefix dual_fr3_cell_description)/share/dual_fr3_cell_description/rviz/dual_fr3_cell.rviz"

You should see two FR3 arms on a table, as in this RViz screenshot. Keep the bringup running throughout the exercise.

Two FR3 arms and table in RViz

Use this RViz command with the mock bringup. dual_fr3_cell_description view_cell.launch.py starts its own joint-state publisher and is intended for viewing the description by itself.

2. Inspect the controllers and joint states

In terminal C:

ros2 control list_hardware_components
ros2 control list_controllers
ros2 topic echo --once /joint_states

The hardware component is FakeSystem. The joint-state broadcaster and both arm controllers should be active. The arm controllers are separate JointTrajectoryController instances, so each arm has its own follow_joint_trajectory action.

The mock starts from this ready pose. These are absolute angles in radians, listed in each controller’s joint order:

Joint number

Left arm joint

Right arm joint

Initial angle (rad)

1

left_fr3_joint1

right_fr3_joint1

0.0

2

left_fr3_joint2

right_fr3_joint2

−0.785

3

left_fr3_joint3

right_fr3_joint3

0.0

4

left_fr3_joint4

right_fr3_joint4

−2.356

5

left_fr3_joint5

right_fr3_joint5

0.0

6

left_fr3_joint6

right_fr3_joint6

+1.571

7

left_fr3_joint7

right_fr3_joint7

+0.785

/joint_states also includes the two hands’ finger joints, and its name array is not limited to one arm. Match every position to the name at the same index; do not copy the full /joint_states position array into an arm goal.

3. Watch one joint in PlotJuggler

In terminal D:

ros2 run plotjuggler plotjuggler

Choose ROS2 Topic Subscriber under Streaming. In its topic selector, select /joint_states and click OK, then click Start. The screenshot shows /joint_states selected in the mock cell’s topic list.

PlotJuggler topic selector with the mock cell's joint_states topic

Expand joint_states in the Timeseries List and drag left_fr3_joint1 → position onto the plot. Set the streaming buffer to at least 15 seconds so it includes the complete five-second move and some time before and after it. Leave PlotJuggler open for the next step.

4. Send an absolute target to the left arm

The existing Python example can address the FR3 controller when all three of its defaults are replaced: controller name, seven joint names, and seven target positions. Its built-in defaults are for a six-joint UR arm, so do not launch it without these arguments.

In terminal C, send the left arm from its initial pose to a target with joint 1 at 0.3 rad. The other six joints keep their initial angles:

ros2 launch ros2_control_python_capabilities_demo send_trajectory.launch.py \
  controller:=left_arm_controller \
  joints:="[left_fr3_joint1, left_fr3_joint2, left_fr3_joint3, left_fr3_joint4, left_fr3_joint5, left_fr3_joint6, left_fr3_joint7]" \
  positions:="[0.3, -0.785, 0.0, -2.356, 0.0, 1.571, 0.785]" \
  duration:=5.0

This is an absolute target: 0.3 means joint 1 should finish at 0.3 rad, rather than move by 0.3 rad from wherever it is now. Keep all seven position values as floats (0.0, not 0) so ROS reads one numeric array type.

The action should print goal accepted, moving... and finish with error_code=0 Goal successfully reached!. On the mock, the measured left_fr3_joint1 position rises from 0.0 to 0.3 rad in five seconds and closely follows the controller reference:

Measured and requested left FR3 joint 1 positions during the mock trajectory

The plot above was recorded from the mock /joint_states and /left_arm_controller/controller_state topics. In RViz, only the left arm should move. In PlotJuggler, left_fr3_joint1/position should rise to about 0.3 rad. Confirm the final joint state:

ros2 topic echo --once /joint_states

Find left_fr3_joint1 in the name array and check its matching position. Repeating the same target after it has already been reached will show little or no motion. To replay from the ready pose, restart the mock bringup or send joint 1 back to 0.0 rad.

5. Try the second arm

The right arm has its own controller and seven right_fr3_joint* names. Send the same small joint-1 target to it:

ros2 launch ros2_control_python_capabilities_demo send_trajectory.launch.py \
  controller:=right_arm_controller \
  joints:="[right_fr3_joint1, right_fr3_joint2, right_fr3_joint3, right_fr3_joint4, right_fr3_joint5, right_fr3_joint6, right_fr3_joint7]" \
  positions:="[0.3, -0.785, 0.0, -2.356, 0.0, 1.571, 0.785]" \
  duration:=5.0

Before sending, predict which arm will move in RViz and which joint-state series will change. Both controllers can be active together because they claim different joints.

If something does not work

Symptom

Check

dual_fr3_cell_bringup or franka_description is missing

Build the cell and its pinned description dependency, then source the workspace.

/controller_manager or /joint_states is missing

Check that ROS_DOMAIN_ID is the same in every terminal and that the mock bringup is still running.

Action server unavailable

Check that the selected arm controller is active in ros2 control list_controllers.

Goal rejected

Pass exactly that arm’s seven joint names and seven positions. The UR script’s default six-joint goal is not valid for an FR3 arm.

Goal succeeds but nothing appears to move

Check whether the arm was already at the target, and plot the correct left or right joint.

This mock demonstrates the ROS command path and controller interpolation. It does not model the real FR3’s dynamics or collision behavior.