Verify with Example Programs
Run some example programs to verify that everything is working.
Run an example C++ program
Compile example C++ programs following Link to C++ RDK from a user program.
Release (pull up) E-stop on the motion bar. The robot will have no action because an enabling method must be called to actually enable the robot.
Run the most basic example program
basics1_display_robot_states
to check the RDK connection can be established and the robot is normally operational. This example program will first enable the robot, then hold the robot while printing out all received robot states. For Linux and macOS:cd flexiv_rdk/example/build ./basics1_display_robot_states [robot_serial_number]
Note
robot_serial_number
is imprinted near the base of the robot. When providing it to the program, replace space with dash or underscore, for example, Rizon4s-123456.
sudo
is only required if the real-time scheduler APIflexiv::rdk::Scheduler
is used.For Windows:
cd flexiv_rdk\example\build\Release basics1_display_robot_states.exe [robot_serial_number]
The robot will be enabled and release the joint brakes, which will make some audible crispy sound. After a few seconds, when the enabling process is done and the robot becomes operational, robot states data will be obtained from the server and gets printed in the Terminal. An excerpt of the output is as follows:
{ "q": [0.000, -0.712, -0.000, 1.576, 0.002, 0.696, 0.000], "theta": [0.000, -0.710, -0.000, 1.575, 0.001, 0.697, 0.000], "dq": [-0.000, -0.000, 0.000, -0.000, -0.000, -0.000, -0.000], "dtheta": [0.000, -0.000, -0.000, -0.000, -0.000, -0.000, 0.000], "tau": [0.000, 46.733, 1.100, -19.021, -2.010, 2.292, -0.000], "tau_des": [-0.000, 0.000, 0.000, -0.000, 0.000, -0.000, -0.000], "tau_dot": [0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000], "tau_ext": [0.000, -0.000, 0.000, 0.000, 0.000, -0.000, 0.000], "tcp_pose": [0.683, -0.110, 0.275, -0.010, 0.001, 1.000, 0.000], "tcp_pose_d": [0.000, 0.000, 0.000, 1.000, 0.000, 0.000, 0.000], "tcp_velocity": [0.000, -0.000, 0.000, -0.000, -0.000, 0.000], "flange_pose": [0.683, -0.110, 0.275, -0.010, 0.001, 1.000, 0.000], "FT_sensor_raw_reading": [0.000, 0.000, 0.000, 0.000, 0.000, 0.000], "F_ext_tcp_frame": [0.000, 0.000, 0.000, 0.000, -0.000, 0.000], "F_ext_world_frame": [-0.000, 0.000, -0.000, -0.000, -0.000, -0.000] }
To close the running example program, simply press
Ctrl+C
.
Run an example Python program
Running en example Python program is similar to running the C++ example program, but without the need for any compilation:
cd flexiv_rdk/example_py
python3 basics1_display_robot_states.py [robot_serial_number]
Note
Replace python3
with python3.x
to explicitly invoke a specific version of Python.