kochigami / cultural_festival

new repository for cultural festival
0 stars 1 forks source link

Naoのフレームの対応を見る #12

Closed kochigami closed 9 years ago

kochigami commented 9 years ago

Naoに、tfを使って人の顔の方を向いてもらおうとしています。 tfのフレームが存在しない、というエラーが出てしまいます。

フレームの対応表はどうやって確認できますか。

kochigami commented 9 years ago

http://wiki.ros.org/tf/Tutorials/Debugging%20tf%20problems を見ましょう。

rosrun tf view_frames evince frames.pdf でフレームの対応表が見れます。

kochigami commented 9 years ago

変になってしまったのでもう一度書きなおします。

roslaunch nao_description nao_v4_publisher.launch を実行しないと [ERROR] [1413090949.614237135]: Frame id /base_link does not exist! Frames (1): のようなエラーが出ます。

しかし、実行しても、次のようなエラーが出ます。 /base_linkを指定しているのに、Frame id がなぜ/ になるのか分かりません。 tfが手に入る前に取りに行こうとしている、ということなのでしょうか。

[ERROR] [1413091041.367569635]: Frame id / does not exist! Frames (38): Frame / CameraBottom_frame exists with parent /HeadPitch_link.
Frame /HeadPitch_link exists with parent /HeadYaw_link.
Frame /CameraTop_frame exists with parent /HeadPitch_link.
Frame /torso exists with parent /base_link.
Frame /base_link exists with parent NO_PARENT.
Frame /gaze exists with parent /HeadPitch_link.
Frame /l_ankle exists with parent /LAnkleRoll_link.
Frame /LAnkleRoll_link exists with parent /LAnklePitch_link.
Frame /l_gripper exists with parent /l_wrist.
Frame /l_wrist exists with parent /LWristYaw_link. Frame /l_sole exists with parent /l_ankle.
Frame /LWristYaw_link exists with parent /LElbowRoll_link.
Frame /r_ankle exists with parent /RAnkleRoll_link.
Frame /RAnkleRoll_link exists with parent /RAnklePitch_link.
Frame /r_gripper exists with parent /r_wrist.
Frame /r_wrist exists with parent /RWristYaw_link.
Frame /r_sole exists with parent /r_ankle.
Frame /RWristYaw_link exists with parent /RElbowRoll_link.
Frame /HeadYaw_link exists with parent /torso.
Frame /LAnklePitch_link exists with parent /LKneePitch_link.
Frame /LKneePitch_link exists with parent /LHipPitch_link.
Frame /LElbowRoll_link exists with parent /LElbowYaw_link.
Frame /LElbowYaw_link exists with parent /LShoulderRoll_link.
Frame /LShoulderRoll_link exists with parent /LShoulderPitch_link.
Frame /LHipPitch_link exists with parent /LHipRoll_link.
Frame /LHipRoll_link exists with parent /LHipYawPitch_link.
Frame /LHipYawPitch_link exists with parent /torso.
Frame /LShoulderPitch_link exists with parent /torso.
Frame /RAnklePitch_link exists with parent /RKneePitch_link. Frame /RKneePitch_link exists with parent /RHipPitch_link.
Frame /RElbowRoll_link exists with parent /RElbowYaw_link.
Frame /RElbowYaw_link exists with parent /RShoulderRoll_link.
Frame /RShoulderRoll_link exists with parent /RShoulderPitch_link.
Frame /RHipPitch_link exists with parent /RHipRoll_link.
Frame /RHipRoll_link exists with parent /RHipYawPitch_link.
Frame /RHipYawPitch_link exists with parent /torso.
Frame /RShoulderPitch_link exists with parent /torso.

kochigami commented 9 years ago

そもそも、受け取っているトピックのframe_idが、たとえ顔の中心座標が入っていても空っぽでした。 私が参考にしているhttps://github.com/jsk-ros-pkg/jsk_demos.gitのinteractive_behavior_201409と自分のプログラムでは、 顔認識に用いているパッケージが異なるので、(face_detector, 私はface_detector_mono) 一度こちらを用いてみて、それでうまく行くか確認します。

YuOhara commented 9 years ago

確かにソースを見たらframe_idが空っぽになってました。 そもそも、平面上のxyしかpubしてないからだと思います

face_detectorだと、そういうことになっていないようですが、こちらはposeを出してて、多分両眼立体視になってるような気がします。naoで、使えるでしょうか?

kochigami commented 9 years ago

frame_idについては、自分の顔にframe_idがなく、変換ができないのだと分かりました。 確かに、 rosmsg show face_detector_mono/RectArray std_msgs/Header header uint32 seq time stamp string frame_id face_detector_mono/Rect[] rects int32 x int32 y int32 width int32 height でdepthがありません。

また、face_detectorでtfが取れる理由は、depthがあるからで、 rosmsg show people_msgs/PositionMeasurement std_msgs/Header header uint32 seq time stamp string frame_id string name string object_id geometry_msgs/Point pos float64 x float64 y float64 z float64 reliability float64[9] covariance byte initialization

だと分かりました。

kochigami commented 9 years ago

両眼立体視ができないから、Nao(/nao_camera/image_raw)では使えませんね。 大人しくface_detector_monoを使います。アドバイスありがとうございました。 tfについても、ちゃんと勉強します。