mirror of
https://github.com/6-robot/wpr_simulation2.git
synced 2025-09-15 12:58:54 +08:00
update demo_3_launch
This commit is contained in:
parent
d1771c94e8
commit
7785774460
@ -2,19 +2,22 @@ from launch_ros.actions import Node
|
||||
from launch import LaunchDescription
|
||||
|
||||
def generate_launch_description():
|
||||
|
||||
publisher_cmd = Node(
|
||||
package='wpr_simulation2',
|
||||
executable='3_publisher_node',
|
||||
name='publisher_node'
|
||||
package='topic_pkg',
|
||||
executable='publisher_node',
|
||||
name='publisher_node'
|
||||
)
|
||||
|
||||
|
||||
subscriber_cmd = Node(
|
||||
package='wpr_simulation2',
|
||||
executable='3_subscriber_node',
|
||||
name='subscriber_node'
|
||||
package='topic_pkg',
|
||||
executable='subscriber_node',
|
||||
name='subscriber_node'
|
||||
)
|
||||
|
||||
ld = LaunchDescription()
|
||||
|
||||
ld.add_action(publisher_cmd)
|
||||
ld.add_action(subscriber_cmd)
|
||||
|
||||
return ld
|
||||
7
demo_launch/3_pub_sub.launch.xml
Normal file
7
demo_launch/3_pub_sub.launch.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<launch>
|
||||
|
||||
<node pkg = "topic_pkg" exec = "publisher_node" name = "publisher_node" />
|
||||
|
||||
<node pkg = "topic_pkg" exec = "subscriber_node" name = "subscriber_node" />
|
||||
|
||||
</launch>
|
||||
9
demo_launch/3_pub_sub.launch.yaml
Normal file
9
demo_launch/3_pub_sub.launch.yaml
Normal file
@ -0,0 +1,9 @@
|
||||
launch:
|
||||
- node:
|
||||
pkg: "topic_pkg"
|
||||
exec: "publisher_node"
|
||||
name: "publisher_node"
|
||||
- node:
|
||||
pkg: "topic_pkg"
|
||||
exec: "subscriber_node"
|
||||
name: "subscriber_node"
|
||||
Loading…
Reference in New Issue
Block a user