Closed zhurui1995 closed 5 months ago
你可以看看命令行中日志么?看起来像是gazebo没有启动成功。
是的,看起来是gazebo没有启动成功。 我按您给的命令,报了如下错。主要说robot_arm.launch.py找不到。
root@8957a728c312:~/mnlm/mnlm/robot/robot_arm_ws# ros2 launch robot_arm robot_arm.launch.py
file 'robot_arm.launch.py' was not found in the share directory of package 'robot_arm' which is at '/home/small-thinking/mnlm/mnlm/robot/robot_arm_ws/install/robot_arm/share/robot_arm'
然后在目录/home/small-thinking/mnlm/mnlm/robot/robot_arm_ws/install/robot_arm/share/robot_arm下,发现了这两个.py文件(robot_arm_rviz.launch.py、robot_arm_sim.launch.py)
我打开了两个终端,并依次运行了以上两个文件,最后得到了想要的结果。(可能只需要运行robot_arm_sim.launch.py就可以?)
然后我遇到一个新的问题,指令能传到仿真端,但仿真环境的机器臂没有进行相应的动作。这个问题我应该从哪方面入手进行解决呢?
bow or bend 命令
Solved! 最后需要把仿真开关打开即开。
谢谢你提供详情。看起来我的无用代码没有清理干净。rviz.launch现在是没有用的。
bow or bend 命令
我也遇到了相同的问题,给出bow or bend 指令执行不了(机械臂不会动 且回复移动不了) 这个情况该如何解决呢?
(execute L149): Error executing robot arm operations: Failed to execute operations: (utils.py:63) 该改什么地方
(execute L149): Error executing robot arm operations: Failed to execute operations: (utils.py:63) 该改什么地方
跟随指令具有一定的随机性。你看看后台日志它识别的指令是什么。
(execute L149): Error executing robot arm operations: Failed to execute operations: (utils.py:63) 该改什么地方
跟随指令具有一定的随机性。你看看后台日志它识别的指令是什么。
2024-03-24 11:58:59,467 INFO main (_embed_instructions L80): Embedding instructions... (utils.py:53) 2024-03-24 11:59:00,489 INFO main (execute L145): Robot arm command: {"instruction": "shake the body", "operations": [{"operation": "move_all_servos", "parameters": {"angles": [45, 60, 60, 30, 0, 0, 0], "time": 500}}, {"operation": "move_all_servos", "parameters": {"angles": [0, 30, 30, 0, 0, 0, 0], "time": 500}}, {"operation": "move_all_servos", "parameters": {"angles": [135, 60, 60, 30, 0, 0, 0], "time": 500}}, {"operation": "move_all_servos", "parameters": {"angles": [0, 0, 0, 0, 0, 0, 0], "time": 500}}]}. (utils.py:53) 2024-03-24 11:59:01,001 ERROR main (execute L149): Error executing robot arm operations: Failed to execute operations: (utils.py:63) 我又试了试 执行的应该是shake the body, 但是机械臂不能成功执行,我也碰到了机械收到了指令但不执行类似的问题
(execute L149): Error executing robot arm operations: Failed to execute operations: (utils.py:63) 该改什么地方
跟随指令具有一定的随机性。你看看后台日志它识别的指令是什么。
2024-03-24 11:58:59,467 INFO main (_embed_instructions L80): Embedding instructions... (utils.py:53) 2024-03-24 11:59:00,489 INFO main (execute L145): Robot arm command: {"instruction": "shake the body", "operations": [{"operation": "move_all_servos", "parameters": {"angles": [45, 60, 60, 30, 0, 0, 0], "time": 500}}, {"operation": "move_all_servos", "parameters": {"angles": [0, 30, 30, 0, 0, 0, 0], "time": 500}}, {"operation": "move_all_servos", "parameters": {"angles": [135, 60, 60, 30, 0, 0, 0], "time": 500}}, {"operation": "move_all_servos", "parameters": {"angles": [0, 0, 0, 0, 0, 0, 0], "time": 500}}]}. (utils.py:53) 2024-03-24 11:59:01,001 ERROR main (execute L149): Error executing robot arm operations: Failed to execute operations: (utils.py:63) 我又试了试 执行的应该是shake the body, 但是机械臂不能成功执行,我也碰到了机械收到了指令但不执行类似的问题
你是指你说的"bow or bend"但是被识别成了"shake the body"么?如果是这样那是语音识别的问题。
如果是指令对了但是没有执行,那是可能因为前面的动作还没执行完毕。
博主你好,我在复现你的工作时,发现把 rros2 launch robot_arm robot_arm_sim.launch.py中的obot_arm.launch.py改为robot_arm_sim.launch.py 可以运行起来,但是进入 http://localhost:8080/vnc.html却出现如下界面:![image](https://github.com/small-thinking/mnlm/assets/76982950/2ecdb7be-43e4-48a0-b701-8abcef67a60f)
我没有外接机械臂。这是虚拟环境,是需要对应的机械臂吗?