Open git183nuozhe opened 6 days ago
Hi @git183nuozhe , it sounds a bit like that your image processing is blocking the communication with the robot. One iteration for the FCI cycle can only take around 500 us (aka receiving data via libfranka, processing it and sending a new command). If something else blocks or delays that, you will see the communcation violation error.
Maybe you can make sure that the image processing is not blocking/delaying or using the same resource than your communication with the robot via libfranka :smiley:
Cheers, Andreas
hi, nice see you. when i use libfranka 0.9.1 "communication_test"only, it is ok. but when run the py script as follows at the same time, the error: terminate called after throwing an instance of 'franka::ControlException' what(): libfranka:Move command aborted:motion aborted by reflex!["communication_constraints_violation"] is comming up. it is not cpu hz problem. what should i do?
the hardware situationa: master computer 192.168.1.10, a franka arm192.168.1.6, a realsense slaver computer192.168.1.13,which all in switch network.
py script the py script is running at realsense slaver computer.the "communication_test"is running at master computer . the py script is used to read letters from a txt file and determine whether to save the realsense image data in the ROS topic as a video based on the letters
!/usr/bin/env python3
import rospy import cv2, re, glob from sensor_msgs.msg import Image
from sensor_msgs.msg import JointState
from cv_bridge import CvBridge
import os
from pathlib import Path
import time
bridge = CvBridge() frame_count = 0 video_writer = None video_file = None is_recording = False
save_dir = None video_savefile = None
flag_num_q = 1
def increment_path(path, exist_ok=False, sep='', mkdir=False):
Increment file or directory path, i.e. save_dir/RGB_video/video, video2, video3, ... etc.
def image_callback(msg): global frame_count, video_writer, video_file, is_recording, video_savefile, flag_num_q
def main(): rospy.init_node('realsense_image_saver_with_timestamp', anonymous=True) rospy.Subscriber("/camera/color/image_raw", Image, image_callback, queue_size=1)
if name == 'main': main()