-
Notifications
You must be signed in to change notification settings - Fork 3
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
merge master(ROS1) into ros2 branch #37
Conversation
* Fix wheel link missing problem Also, add comments about params -wheelTorque: 5 +wheelTorque: 500 Co-authored-by: Shota Aoki <s.aoki@rt-net.jp> * Fix typo to suppress warnings loading GazeboPlugin same as rt-net/jnmouse_description#9 * Fix default namespace to avoid odometry tf error related: rt-net/raspimouse_sim#55 * Refactor * Add an option to load gazebo plugin to allow URDF to be loaded without gazebo_ros * Separate DiffDriveController into separate files * Add laser link option * s/laser_frame/lidar_frame/g * Update lidar_frame name option Co-authored-by: Shota Aoki <s.aoki@rt-net.jp>
* Add GitHub repository description to README * Update README.md Co-authored-by: Shota Aoki <s.aoki@rt-net.jp> Co-authored-by: Shota Aoki <s.aoki@rt-net.jp>
* Fix wheel link missing problem Also, add comments about params -wheelTorque: 5 +wheelTorque: 500 Co-authored-by: Shota Aoki <s.aoki@rt-net.jp> * Fix typo to suppress warnings loading GazeboPlugin same as rt-net/jnmouse_description#9 * Fix default namespace to avoid odometry tf error related: rt-net/raspimouse_sim#55 * Refactor * Add an option to load gazebo plugin to allow URDF to be loaded without gazebo_ros * Separate DiffDriveController into separate files * Add laser link option * s/laser_frame/lidar_frame/g * Update lidar_frame name option * Avoid slipping * Separate option parts Co-authored-by: Shota Aoki <s.aoki@rt-net.jp>
* Update model and add RT Corporation logo * Fix main circuit board position * Update xacro option * Fix merge error a25febe * Refactor * Optimize collada * Add URDF with URG
* Add a simple launch file to load robot description * Merge into single launch file * Refactor lowercase letters are introduced as an example https://wiki.ros.org/roslaunch/XML#if_and_unless_attributes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
$ ros2 launch raspimouse_description display.launch.py namespace:=test1
$ ros2 launch raspimouse_description display.launch.py namespace:=test2 use_rviz:=false
$ ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 world test1/base_footprint
$ ros2 run tf2_ros static_transform_publisher 0.5 0 0 0 0 0 world test2/base_footprint
上記を実行すると2台とも同じjoint_state_publisher_guiの状態が反映されてしまうようです。
ScreenRecord-2021-12-16_19.24.51.mp4
また、launchで呼び出すノード名が同じためワーニングが出ています。
$ ros2 node list
WARNING: Be aware that are nodes in the graph that share an exact name, this can have unintended side effects.
/joint_state_publisher
/robot_state_publisher
/robot_state_publisher
/rviz2
/static_transform_publisher_4nyZeL3zSvkKdN8y
/static_transform_publisher_TS3iokZfTF7cGlA8
/transform_listener_impl_55f08e714050
ROS 1の方ではROS_NAMESPACE
変数を使うという方法がありましたが、手元で試したところ、ROS 2ではどうもros2 launch
では反映されないようです。
https://discourse.ros.org/t/giving-a-turtlebot3-a-namespace-for-multi-robot-experiments/10756
Discourseの投稿を見るとNode()
にnode_namespace='tb3_0'
を追加しているようです。
どう名前空間を分けるのがいいでしょうかね 🤔
@Tiryoh # 引数でネームスペースを指定
$ ros2 launch raspimouse_description display.launch.py namespace:=test1
# ノード一覧を表示
$ ros2 node list
/test1/joint_state_publisher
/test1/robot_state_publisher
/test1/rviz2
/test1/transform_listener_impl_55a1d46b9380 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
確認しました。
$ ros2 launch raspimouse_description display.launch.py namespace:=test1
$ ros2 launch raspimouse_description display.launch.py namespace:=test2 use_rviz:=false
$ ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 world test1/base_footprint
$ ros2 run tf2_ros static_transform_publisher 0.2 0 0 0 0 0 world test2/base_footprint
$ ros2 run joint_state_publisher_gui joint_state_publisher_gui --ros-args -r __ns:=/test2
What does this implement/fix?
masterブランチ(ROS 1) の変更を ros2ブランチへ取り込みます。
launchファイルは移植できなかったため、下記のように手を加えています。
lidar_frame
オプションを追加xacro_option
は移植していません。必要になったタイミングで実装しますnamespace
オプションを追加use_rviz
オプションを追加use_gui
は移植していません。必要になったタイミングで実装しますDoes this close any currently open issues?
いいえ
How has this been tested?
Ubuntu 20.04 & ROS 2 Foxy環境で下記の項目を確認しています。
$ ros2 launch raspimouse_description display.launch.py
でモデルが表示されることを確認しました$ ros2 launch raspimouse_description display.launch.py lidar:=urg lidar_frame:=test
でURG付きモデルが表示されることを確認しましたまた、
$ ros2 run tf2_tools view_frames.py
を実行し、生成されたframes.pdf
を表示し、lidarのリンク名が変更されていることを確認しています。下記コマンドを個別のターミナルで実行し、rvizとjoint_state_publisherが1つずつしか起動しないこと、
rviz上に2つのラズパイマウスが表示されることを確認しています。
Any other comments?
gazeboの設定についてはROS 2版のraspimouse_simの開発と並行して整えていきます。
Checklists