get_actual_joint_current
Retrieve real-time current measurements in amperes for each joint of a Universal Robot at a specified IP address to monitor robotic arm performance and operational status.
Instructions
获取指定IP机器人各关节的电流(安培) IP:机器人地址
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ip | Yes |
Implementation Reference
- This is the handler function for the 'get_actual_joint_current' tool, decorated with @mcp.tool(). It retrieves the actual joint currents for the robot at the given IP by calling robotModle_list[ip].ActualJointVoltage() (note: likely a bug, should be ActualJointCurrent()). It checks connection first and returns formatted JSON response.@mcp.tool() def get_actual_joint_current(ip: str): """获取指定IP机器人各关节的电流(安培) IP:机器人地址""" try: if '连接失败' in link_check(ip): return return_msg(f"与机器人的连接已断开。") logger.info(f"{robotModle_list[ip].ActualJointVoltage()}(安培)") return return_msg(f"{robotModle_list[ip].ActualJointVoltage()}(安培)") except Exception as e: logger.error(f"机器人各关节的电流获取失败: {str(e)}") return return_msg(f"机器人各关节的电流获取失败: {str(e)}")