Skip to content

Conversation

k-okada
Copy link
Member

@k-okada k-okada commented May 5, 2020

requires ros-simulation/gazebo_ros_pkgs#1098

@YoheiKakiuchi @Naoki-Hiraoka @pazeshun gazebo で物体の位置姿勢ってダイレクトに取れるんだと思うけど,そのためのやりかった(ノード)って何処かにあるのかな.

シミュレーション思い人向けに画像処理有り/無しを切り替えられたら良いと思って.

@k-okada k-okada added the wontfix label May 5, 2020
@YoheiKakiuchi
Copy link
Member

トピックとサービスで出ていて、トピックはモデルが多くなると、
他のモデルのデータも含めて出るのでgazeboが遅くなるかも。
あと、time stampついてないですね。

$ rostopic echo /gazebo/model_states

---
name: [ground_plane]
pose: 
  - 
    position: 
      x: 0.0
      y: 0.0
      z: 0.0
    orientation: 
      x: 0.0
      y: 0.0
      z: 0.0
      w: 1.0
twist: 
  - 
    linear: 
      x: 0.0
      y: 0.0
      z: 0.0
    angular: 
      x: 0.0
      y: 0.0
      z: 0.0
---

サービスはモデル名指定 (get_link_stateでリンク名指定)で特定のモデル(リンク)の姿勢が取れる。
time stampもついてくる。
こちらを定期的にコールして、poseとかposedetection_msgs をpubするpython書くんでしょうか?

$ rosservice call /gazebo/get_model_state '{model_name: "ground_plane"}'

---
header: 
  seq: 2
  stamp: 
    secs: 387
    nsecs: 133000000
  frame_id: ''
pose: 
  position: 
    x: 0.0
    y: 0.0
    z: 0.0
  orientation: 
    x: 0.0
    y: 0.0
    z: 0.0
    w: 1.0
twist: 
  linear: 
    x: 0.0
    y: 0.0
    z: 0.0
  angular: 
    x: 0.0
    y: 0.0
    z: 0.0
success: True
status_message: "GetModelState: got properties"
---

あれ、こんな便利ノードあったんですか
https://github.com/k-okada/rtmros_tutorials/blob/add_gazebo_model_pose_publish/hironx_tutorial/launch/gazebo_mode_pose_publish.launch#L3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants