You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it remind me that:Motion failed: Unable to cast Python instance of type <class 'panda_py.libfranka.JointPositions'> to C++ type '?' (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)
could u help me ? i cannot fix it . thank you!!!!
The text was updated successfully, but these errors were encountered:
hi , thanks for releasing code! while i use libfranka control method in this way:
target_joint_positions = [0.0, -0.78539816, 0.0, -2.35619449, 0.0, 1.57079633, 1.57079633]
def motion_generator(state: RobotState, period: Duration) -> JointPositions:
global start_time
current_joint_positions = state.q
elapsed_time = time.time() - start_time
interpolation_ratio = min(elapsed_time / motion_duration, 1.0)
desired_joint_positions = current_joint_positions + interpolation_ratio * (
np.array(target_joint_positions) - np.array(current_joint_positions)
)
joint_positions = JointPositions(desired_joint_positions.tolist())
if elapsed_time >= motion_duration:
joint_positions.motion_finished = True
else:
joint_positions.motion_finished = False
return joint_positions
motion_duration = 5.0
start_time = time.time()
try:
print("Starting motion...")
robot.control(motion_generator)
except Exception as e:
print(f"Motion failed: {e}")
finally:
print("Stopping motion...")
robot.stop()
it remind me that:Motion failed: Unable to cast Python instance of type <class 'panda_py.libfranka.JointPositions'> to C++ type '?' (#define PYBIND11_DETAILED_ERROR_MESSAGES or compile in debug mode for details)
could u help me ? i cannot fix it . thank you!!!!
The text was updated successfully, but these errors were encountered: