This repository has been archived by the owner on Jan 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from future731/dev/sender-with-yaml-config
sender with yaml config
- Loading branch information
Showing
8 changed files
with
116 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# consai2r2_sender | ||
|
||
ロボット(grSim)へ動作司令を送信するパッケージです。 | ||
<!-- ロボット(実機/grSim)へ動作司令を送信するパッケージです。 --> | ||
|
||
|
||
## ノードの起動方法 | ||
|
||
次のコマンドでsenderが起動します。 | ||
|
||
```sh | ||
ros2 launch consai2r2_sender sender.launch.py | ||
``` | ||
|
||
<!-- | ||
## 実機 / grSim の切り替え方法 | ||
`consai2_sender/launch/sender.launch`を編集するか、 | ||
launchファイルの引数で設定できます。 | ||
```sh | ||
# 例:実機のロボットに動作司令を送信する | ||
roslaunch consai2_sender sender.launch sim:=false | ||
# 例:grSimのロボットに動作司令を送信する | ||
roslaunch consai2_sender sender.launch sim:=true | ||
``` | ||
--> | ||
|
||
<!-- | ||
## grSimのサーバアドレス・ポートの変更方法 | ||
`consai2_description/param/game.yaml`を編集します。 | ||
--> | ||
|
||
<!-- | ||
## 実機送信機のデバイス・ボーレートの変更方法 | ||
`consai2_description/param/game.yaml`を編集します。 | ||
## Subsribe Topics | ||
- sim_sender | ||
- consai2_control/robot_commands' (consai2_msgs/RobotCommands) | ||
- ロボットの動作司令 | ||
- real_sender | ||
- consai2_control/robot_commands' (consai2_msgs/RobotCommands) | ||
- ロボットの動作司令 | ||
--> | ||
|
||
## 参考ページ | ||
### Google proto files | ||
- grSim | ||
- https://github.com/RoboCup-SSL/grSim/tree/master/src/proto |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
consai2r2_sim_sender: | ||
ros__parameters: | ||
grsim_addr: '127.0.0.1' | ||
grsim_port: 20011 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) 2019 SSL-Roots | ||
# | ||
# Permission is hereby granted, free of charge, to any person obtaining a copy | ||
# of this software and associated documentation files (the "Software"), to deal | ||
# in the Software without restriction, including without limitation the rights | ||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
# copies of the Software, and to permit persons to whom the Software is | ||
# furnished to do so, subject to the following conditions: | ||
# | ||
# The above copyright notice and this permission notice shall be included in | ||
# all copies or substantial portions of the Software. | ||
# | ||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL | ||
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
# THE SOFTWARE. | ||
|
||
import os | ||
from ament_index_python.packages import get_package_share_directory | ||
from launch import LaunchDescription | ||
from launch_ros.actions import Node | ||
|
||
|
||
def generate_launch_description(): | ||
start_sender_cmd = Node( | ||
package='consai2r2_sender', node_executable='sim_sender', | ||
output='screen', | ||
parameters=[os.path.join(get_package_share_directory( | ||
'consai2r2_sender'), 'config', 'grsim.yaml')] | ||
) | ||
|
||
ld = LaunchDescription() | ||
|
||
ld.add_action(start_sender_cmd) | ||
|
||
return ld |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters