start-jsk / rtmros_tutorials

Tutorials for rtmros packages
6 stars 61 forks source link

[hrpsys_ros_bridge_tutorials/A0B] add A0B interface #605

Closed YuyaNagamatsu closed 1 year ago

YuyaNagamatsu commented 2 years ago

https://github.com/start-jsk/rtmros_hrp2/pull/602 で追加したA0Bモデルに対応するインタフェースです.

YuyaNagamatsu commented 1 year ago

レビューを進めていただいているようで簡単に見直しましたが、本PRのコミット部分にtqleg0という文字列が2箇所あるようで、間違ってるかも?と違和感を感じました。 検証と必要であれば修正をお願いします。

W567 commented 1 year ago

I've tested the code, and it works well in hrpsys with command from euslisp.

As @YuyaNagamatsu mentioned above, there are two locations with tqleg0, one of which though will not influence the effects. For code uniformity, it has been changed to a0b in the latest commits.

Also, inside _hrpsys_ros_bridge_tutorials/src/hrpsys_ros_bridge_tutorials/urata_hrpsysconfig.py

def a0bResetPose(self):
        return [0, 0, 0, 0, 0, 0]

a0bResetPose is going to set all joint angles to 0, but based on a0b.yaml, the reset-pose may have angle-vector as [60.0, -90.0, 90.0, -30.0, -90.0, 90.0] ?

I have no ideas how to test the urata_hrpsys_config.py, if there's any interface that I can test a0bResetPose()? Can @Naoki-Hiraoka please give me any advice?

https://user-images.githubusercontent.com/35333281/229972805-7d112450-d411-458e-a7b7-c24f472b5a4f.mp4

Another question is, currently gazebo simulation has not been set up for a0b inside rtm_gazebo, I'm not sure if it's necessary. Anyway, I've set up the mujoco environment for a0b, and the current plan is to create a package here https://gitlab.jsk.imi.i.u-tokyo.ac.jp/neuro_vm/robot/jsk_a0b_robot to store a0b model, euslisp and python scripts. Any advice would be appreciated. @k-okada

Naoki-Hiraoka commented 1 year ago

I have no ideas how to test the urata_hrpsys_config.py, if there's any interface that I can test a0bResetPose()?

Terminal1

rtmlaunch hrpsys_ros_bridge_tutorials a0b.launch

Terminal2

roscd hrpsys_ros_bridge_tutorials/src/hrpsys_ros_bridge_tutorials
ipython -i a0b_hrpsys_config.py "A0B(Robot)0"
hcf.setResetPose()

a0b.yamlのreset-poseとurata_hrpsys_config.pyのreset-poseは、迷ったら同じ値にしておくのが良いと思います。reset-poseは中核的な機能というわけではなく、あったら便利な便利関数という程度の位置づけだと思うので、2つのファイルの値を揃えることに注意を払う必要は低く、使う人が使いやすいようになっていれば良いと思います。

Another question is, currently gazebo simulation has not been set up for a0b inside rtm_gazebo, I'm not sure if it's necessary. Anyway, I've set up the mujoco environment for a0b

単純な興味なのですが、a0b実機・シミュレーションはそれぞれ、今はどうやって動かしていますか。(もしかして、実機はneuro_vmのrospluginを使っていてhrpsysを使っていない? シミュレーションもmujocoのrosインタフェースを使っていてhrpsysを使っていない? )

W567 commented 1 year ago

@Naoki-Hiraoka Thank you for the instructions. Simulation inside hrpsys works well with commands hcf.setResetPose() and hcf.setInitPose(). I think this PR can be merged now.

単純な興味なのですが、a0b実機・シミュレーションはそれぞれ、今はどうやって動かしていますか。(もしかして、実機はneuro_vmのrospluginを使っていてhrpsysを使っていない? シミュレーションもmujocoのrosインタフェースを使っていてhrpsysを使っていない? )

Yes, the real robot is moved based on rosplugin of neuro_vm, and I guess previous experiments were all done with the real robot, without simulation? Current simulation environment has been set up based on mujoco via ros interface. So, maybe A0B has all been seperated from hrpsys?

Naoki-Hiraoka commented 1 year ago

Yes, the real robot is moved based on rosplugin of neuro_vm, and I guess previous experiments were all done with the real robot, without simulation? Current simulation environment has been set up based on mujoco via ros interface. So, maybe A0B has all been seperated from hrpsys?

the current plan is to create a package here https://gitlab.jsk.imi.i.u-tokyo.ac.jp/neuro_vm/robot/jsk_a0b_robot to store a0b model, euslisp and python scripts.

ご回答ありがとうございます。A0Bはhrpsysを使っていないのでしたら、このPull Reqeustやhttps://github.com/start-jsk/rtmros_hrp2/pull/602 の内容を start-jskに置く必然性は無いかもしれないですね。僕は数百Hzの動力学制御処理を実装する場合には依然としてOpenRTMが便利だと思っていますが、rospluginを使った上でneuro_vm内で実装する方が良いという人もいると思いますし。

教員のご判断を仰ぎたいと思います。

k-okada commented 1 year ago

Anyway, I've set up the mujoco environment for a0b, and the current plan is to create a package here https://gitlab.jsk.imi.i.u-tokyo.ac.jp/neuro_vm/robot/jsk_a0b_robot to store a0b model, euslisp and python scripts. Any advice would be appreciated. @k-okada

You experienced that your supervisor asked you to use a new framework and robots (use rviz for visualization, simulate your algorithm with different robots etc...) 1 week before your submission. So it is always better to not keep all necessary software in one place, which seems simple and beautifly, but lose the chance to get in touch with other frameworks/tools/robots as long as it is not become too complicated. It also tends to re-invent wheels if you only see what you have now.

https://community.robotshop.com/uploads/v/a/vabry/imported/Comic1.jpg https://community.robotshop.com/uploads/v/a/vabry/imported/Robot-Comics.jpg

It is also noted that setting up your source tree from multiple repositories, multiple frameworks are supported by many development tools.

-- ◉ Kei Okada

-- ◉ Kei Okada

2023年4月5日(水) 13:33 Liqi WU @.***>:

@W567 approved this pull request.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>