
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
OPIL Robot Agent Node(RAN)是位于OPIL平台与机器人硬件之间的中间层组件,主要实现两大功能:基于ROS(机器人操作系统)的导航管理,以及作为OPIL数字物理中间件与机器人硬件的接口(通过FIWARE Orion Context Broker)。它能将FIWARE实体转换为ROS可理解的消息和服务,反之亦然。
需准备以下配置文件(与docker-compose.yml同目录):
创建空文件命令:
bashtouch firos_config.json firos_robots.json firos_whitelist.json mod_iot_ran.launch simulation.launch stage.world
ymlservices: opil.mod.sw.tp.ts: image: "docker.xuanyuan.run/l4ms/opil.sw.tp.ts" depends_on: - opil.mod.sw.tp.mtp environment: - PYTHONUNBUFFERED=1 - "ROS_MASTER_URI=http://opil.mod.sw.tp.mtp:11311" volumes: - ./ts_firos_config.ini:/catkin_ws/src/taskplanner/firos_config.ini ports: - "2906:2906" opil.mod.sw.tp.mtp: image: "docker.xuanyuan.run/l4ms/opil.sw.tp.mtp:latest" environment: - "ROS_MASTER_URI=http://localhost:11311" - DISPLAY=$DISPLAY volumes: - /tmp/.X11-unix:/tmp/.X11-unix:rw - ./mod_sw_tp.launch:/catkin_ws/src/mod_sw_tp/launch/mod_sw_tp.launch - ./firos_robots.json:/catkin_ws/src/firos/config/robots.json - ./firos_whitelist.json:/catkin_ws/src/firos/config/whitelist.json - ./firos_config.json:/catkin_ws/src/firos/config/config.json ports: - "11311:11311" - "39001:39001" version: "3.5"
bashxhost local:root
bashdocker-compose up
Firos配置
firos_config.json(连接Orion)
json{ "environment": "docker", "docker": { "server": { "port": 10101 }, "contextbroker": { "address": "<orion地址>", "port": 1026, "subscription": { "throttling":0, "subscription_length":300, "subscription_refresh_delay":0.5 } }, "endpoint": { "address": "<本地网络地址>", "port":39000 }, "log_level": "INFO" } }
firos_robots.json(话题映射)
json{ "robot_opil_v2": { "topics": { "current_motion": {"msg":"mars_agent_physical_robot_msgs.msg.Motion","type":"subscriber"}, "robot_description": {"msg":"mars_agent_physical_robot_msgs.msg.RobotAgentProperties","type":"subscriber"}, "cancel_order": {"msg":"mars_agent_physical_robot_msgs.msg.CancelTask","type":"publisher"}, "motion_assignment": {"msg":"mars_agent_physical_robot_msgs.msg.MotionAssignment","type":"publisher"}, "action_assignment": {"msg":"mars_agent_physical_robot_msgs.msg.ActionAssignment","type":"publisher"} } } }
firos_whitelist.json(话题白名单)
json{ "robot_opil_v2": { "publisher": ["cancel_order","motion_assignment","action_assignment"], "subscriber": ["current_motion","robot_description"] } }
RAN配置(mod_iot_ran.launch)
核心启动文件,包含机器人参数、Firos与仿真集成:
xml<launch> <arg name="robot_1_name" default="robot_1" /> <arg name="initial_pose_robot_1_x" default="6.0"/> <arg name="initial_pose_robot_1_y" default="0.0"/> <arg name="initial_pose_robot_1_a" default="0.0"/> <arg name="robot_1_id" default="00000000-0000-0000-0000-000000000001"/> <node name="firos" pkg="firos" type="core.py"/> <node name="rviz" pkg="rviz" type="rviz" args="-d $(find mars_simulation)/rviz/opil_finnland.rviz" /> <include file="$(find mars_simulation)/launch/opil_finnland_simulation.launch"/> <group ns="robot_opil_v2"> <param name="tf_prefix" value="robot_1" /> <include file="$(find mars_simulation_ctv_agent)/launch/mars_simulation_ctv_agent.launch"> <arg name="robot_id" value="$(arg robot_1_id)"/> <arg name="robot_name" value="$(arg robot_1_name)"/> <arg name="initial_pose_x" value="$(arg initial_pose_robot_1_x)"/> </include> <node pkg="tf2_ros" type="static_transform_publisher" args="0 0 0 0 0 0 1 map robot_1/odom" /> <node name="fake_localization" pkg="fake_localization" type="fake_localization"> <param name="odom_frame_id" value="robot_1/odom"/> <param name="base_frame_id" value="robot_1/base_link"/> </node> </group> </launch>
仿真配置
stage.world
include "multishuttle.inc" resolution 0.05 interval_sim 100 window ( size [800 800] scale 21.642 ) map ( name "opil_finnland" size [26.891 15.126 1.000] pose [3.512 1.479 0.000 0.000] bitmap "opil_finnland.png" ) multishuttle( pose [6.0 0.0 0.000 0.000] name "robot_0" color "yellow")
simulation.launch
xml<launch> <arg name="robot_1_ns" default="00000000000000000000000000000001"/> <param name="/use_sim_time" value="true"/> <node name="map_server" pkg="map_server" type="map_server" args="$(find mars_simulation_data)/world/opil_finnland.yaml"/> <node pkg="stage_ros" type="stageros" args="$(find mars_simulation_data)/world/opil_finnland.world"> <remap from="robot_1/cmd_vel" to="/robot_opil_v2/cmd_vel" /> </node> </launch>
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务