Closed a-z-e-r-i-l-a closed 1 year ago
ask the same question
As you said the readOnce cannot be called while controlling the robot. When a controller is running you get the RobotState in the control callback. You can pass it to another thread by protecting it with a mutex. See the joint_impedance_example
I have an implementation of a controller which uses the control method of franka_hw to move the robot.
I have written another node that connects to the robot by
franka::Robot robot(robot_ip);
and usesrobot.readOnce()
to see the current state of the robot. However, I noticed that I can't run both of these codes at the same time and afranka::NetworkException´ and ´libfranka: UDP receive: Timeout
is raised if I do so.Is there any way however to read the robot's state while a controller is already running?