Verify with Example Programs
Run some example programs to verify that everything is working.
Run an example C++ program
Compile example C++ programs following Use the installed library.
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_statesto 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.On Linux and macOS:
cd flexiv_rdk/example/build LD_LIBRARY_PATH=~/rdk_install/lib ./basics1_display_robot_states <robot-sn>
On Windows:
cd flexiv_rdk\example\build set PATH=%USERPROFILE%\rdk_install\bin;%PATH% Release\basics1_display_robot_states.exe <robot-sn>
Note
Replace
<robot-sn>with the actual serial number of the robot. When passing it to the program, replace space with dash or underscore, for example,Rizon4s-123456.
LD_LIBRARY_PATHorPATHis used to specify where the shared libraries of the dependencies are installed.Root privilege is required if the real-time scheduler API
flexiv::rdk::Scheduleris used in the program.
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-sn>
Note
Replace python3 with python3.x to explicitly invoke a specific version of Python.