Xarm 7 c sdk, is get timestamped data from the robot

I am controlling my xArm7 with c sdk. Using the servo mode the robot give quick responses. However, when there is communication delay, it is quite dangerous as the command may keep updating but the robot did not move. Once the communication is restored, the robot jumps to the new command. Is there a way to regularly get the robot status, or a way to get the timestamped data from the robot so that we write codes to check if the communication is disrupted.

Thanks


UFACTORY Website
Official Store
uArm User Facebook Group

Feedback:
English Channel
中文通道

Hi Wongrata,

The most important for Servoj mode is that it requires a real-time system, please don’t use a system with network delay, you can use Linux with PREEMPT_RT patched kernel.
Building a real-time Linux kernel [community-contributed] — ROS 2 Documentation: Foxy documentation

You can use TCP port 30000 to get the timestamp and position, the frequency is 200HZ, but the frequency of Servoj mode is 250HZ.
https://github.com/xArm-Developer/ufactory_docs/tree/main/firmware/report

Best regards,
Minna

" The most important for Servoj mode is that it requires a real-time system, please don’t use a >> system with network delay, you can use Linux with PREEMPT_RT patched kernel.
)"

I am using the command " set_servo_cartesian". I am not sure this solve the problem. Sometime after the pc is on for a while, the program may run with some delay. Some time after waking up.

You can use TCP port 30000 to get the timestamp and position, the frequency is 200HZ, but the >>frequency of Servoj mode is 250HZ.
ufactory_docs/firmware/report at main · xArm-Developer/ufactory_docs · GitHub

Is there a c++ command to get the timestamped. How do I achieve this? Many thanks

Hi Wongrata,

Do you use Linux system and patch the PREEMPT_RT?
Do you refer to the docs? Byte5-12 is used for Timestamp.
https://github.com/xArm-Developer/ufactory_docs/blob/main/firmware/report/ReadMe_en.md
https://github.com/xArm-Developer/xArm-CPLUS-SDK/blob/master/example/3004-get_report_data.cc

Best regards,
Minna