Repository navigation
自动执行机械臂移动和抓取 - #4471
Closed
wangadsa wants to merge 9 commits into
Closed
自动执行机械臂移动和抓取#4471wangadsa wants to merge 9 commits into
wangadsa wants to merge 9 commits into
Conversation
# Please enter a commit message to explain why this merge is necessary, # especially if it merges an updated upstream into a topic branch. # # Lines starting with '#' will be ignored, and an empty message aborts # the commit.
Member
|
.idea文件夹需要删除 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
修改概述:
修改的详细描述
移除callback参数(关键):
删掉了viewer.launch中的callback参数,只保留model和data,适配所有 MuJoCo 版本。
改为在启动 Viewer 前先执行机械臂移动和抓取逻辑,确保核心功能正常。
增加双启动模式(最高兼容):
先尝试使用viewer.launch(简易启动),如果报错则自动切换到手动循环模式(viewer.Viewer实例 + 帧循环),这是 MuJoCo 最兼容的可视化启动方式。
优化逆运动学(避免额外错误):
注释掉可能存在兼容问题的mj_inverse调用,改用手动坐标到角度的映射,确保机械臂能稳定运动。
保留原生可视化界面:
无论哪种启动方式,都会显示 MuJoCo 原生的带控制面板的可视化窗口(和你需要的截图样式一致)。
经过了什么样的测试?
运行效果
动图、视频、截图等
