Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for launching multiple robots #35

Merged
merged 1 commit into from Dec 14, 2021
Merged

Conversation

Tiryoh
Copy link
Contributor

@Tiryoh Tiryoh commented Dec 13, 2021

What does this implement/fix?

複数ロボットの起動のためにrobot_state_publishertf_prefixのオプションを使用します。

Noeticでは一旦削除されその後再実装されたという経緯があり、1.15.2以降で利用できるようです。

ros/robot_state_publisher#169

RVizを使わないときにはjoint_state_controllerを使う場面の方が多いと思うのでjoint_state_publisherを削除します。

Does this close any currently open issues?

いいえ

How has this been tested?

namespaceを指定するとprefixがつくことを確認できます。

roslaunch raspimouse_description display_xacro.launch use_rviz:=false namespace:=raspimouse1

Screenshot from 2021-12-13 18-52-03

先頭に/がつかないですがこれがrobot_state_publisherの挙動のようです。

https://answers.ros.org/question/43145/tf-namespace-resolution/

Any other comments?

なし

Checklists

  • I have read the CONTRIBUTING guidelines.
  • I have checked to ensure there aren't other open Pull Requests for the same change.

@ShotaAk
Copy link
Contributor

ShotaAk commented Dec 14, 2021

namspaceを指定したとき、RVizのGlobal Options -> Fixed Frameと、RobotModel -> TF Prefixを設定すればモデルが表示されることを確認しました。

image

Copy link
Contributor

@ShotaAk ShotaAk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ROS Noetic環境でtf_prefixが機能することを確認しました。

@ShotaAk ShotaAk merged commit 1b342f6 into master Dec 14, 2021
@ShotaAk ShotaAk deleted the feature/support-multi-robot branch December 14, 2021 06:38
@Tiryoh Tiryoh added the ROS 1 label Dec 15, 2021
@Tiryoh
Copy link
Contributor Author

Tiryoh commented Dec 17, 2021

2つのモデルの可視化方法

ROS_NAMESPACE=test1 roslaunch raspimouse_description display_xacro.launch namespace:=test1
ROS_NAMESPACE=test2 roslaunch raspimouse_description display_xacro.launch namespace:=test2 use_rviz:=false
rosrun tf static_transform_publisher 0 0 0 0 0 0 world test1/base_footprint 1
rosrun tf static_transform_publisher 0.5 0 0 0 0 0 world test2/base_footprint 1
ROS_NAMESPACE=test2 rosrun joint_state_publisher_gui joint_state_publisher_gui
ScreenRecord-2021-12-17_15.14.48.mp4

Tiryoh added a commit that referenced this pull request Dec 20, 2021
* Add lidar link rename option (#23)
* Add GitHub repository description to README (#27)
* Fix slipping (#28)
* Update model and add RT Corporation logo (#29)
* Update tread (#31)
* Add a simple launch file to load robot description (#34)
* Support for launching multiple robots (#35)

Co-authored-by: Daisuke Sato <daisuke.sato@rt-net.jp>
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.

None yet

2 participants