skill.py
Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboSkill/demo_manufacturer/demo_model/skill.py
from mcp.server.fastmcp import FastMCP
# Initialize FastMCP server
mcp = FastMCP("robots")
@mcp.tool()
async def navigate_to_target(target: str) -> str:
"""Navigate to target, do not call when Navigation to target has been successfully performed.
Args:
target: String, Represents the navigation destination.
"""
ret = f"Navigation to {target} has been successfully performed."
print(ret)
return ret
@mcp.tool()
async def grasp_object(object: str) -> str:
"""Pick up the object, do not call when object has been successfully grasped.
Args:
object: String, Represents which to grasp.
"""
ret = f"{object} has been successfully grasped."
print(ret)
return ret
@mcp.tool()
async def place_to_affordance(affordance: str, object: str = None) -> str:
"""Place the grasped object in affordance, do not call when object has been successfully placed on affordance."
Args:
affordance: String, Represents where the object to place.
object: String, Represents the object has been grasped.
"""
ret = f"{object} has been successfully placed on {affordance}."
print(ret)
return ret
if __name__ == "__main__":
# Initialize and run the server
mcp.run(transport="stdio")
相關文章
alloc.c
alloc.c — c source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/class001_bundle/alloc.c).
閱讀文章 →hello.c
hello.c — c source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/class001_bundle/hello.c).
閱讀文章 →mlock_demo.c
mlock_demo.c — c source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/class001_bundle/mlock_demo.c).
閱讀文章 →debug_perf.py
debug_perf.py — python source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboBrain2.0/debug_perf.py).
閱讀文章 →inference.py
inference.py — python source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboBrain2.0/inference.py).
閱讀文章 →startup.sh
startup.sh — bash source code from the Robotaxi-OperatingSystem-Hardware-Interfaces learning materials (Robotaxi-OperatingSystem-Hardware-Interfaces/fmc3-robotics-main/projects/RoboBrain2.0/startup.sh).
閱讀文章 →