0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MuJoCoのサンプルファイルをVSCodeで編集・実行したい

0
Posted at

MuJoCoサンプルモデルをVSCodeで編集・実行するための拡張機能とその使用例

おすすめ拡張機能

① XML言語サポート
XML言語サポートRedHat拡張.png
② MuJoCo ビューワー
MuJoCo Viewer 拡張機能.png

この2つの拡張機能をVSCodeにインストールする.

そして,編集したいMuJoCoモデル(~.xml)をVSCodeで開き,CTRL+K つづけて CTRL+T と押すと,xmlファイルの配色のテーマがプルダウンメニューでポップアップするので,任意のものを選択する.

すると,開いているXMLコードに色がついて見やすくなる.
(私は,Dark+がいいんじゃないかと思います)

xml 配色のテーマ選択CTRL K, T.png

つぎにサンプルとして,GitHubからバランスロボットカーをクローンします.
ダウンロードされた.zipファイルを解凍して,その下の\src\simulationフォルダ内のscene.xmlファイルをVSCodeで開きます.

そして,Shift+Ctrl+Pで,
MuJoCo: Open with MuJoCo Viewer を選択すると以下のような新しいタブが表示されます.

MuJoCo Viewer.png

画面中央上の三角(再生ボタン)をクリックすると,シミュレーションも実行することができます!

さらに,Editボタンを押すと,ちょっとした編集もできてしまうのは,非常にありがたい.

MuJoCo Viewer 編集.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?