Added new robot descriptions for Robotoid
This commit is contained in:
63
mg_bringup/launch/base.launch.py
Normal file
63
mg_bringup/launch/base.launch.py
Normal file
@@ -0,0 +1,63 @@
|
||||
################################################################################
|
||||
# #
|
||||
# Launch file meant to be used on the robot itself #
|
||||
# uses: #
|
||||
# * mg_control - for sending commands to the stepper drivers #
|
||||
# * mg_odometry - for reading and controlling the MCU encoders #
|
||||
# * mg_navigation - runs the local planner and handles move behaviors #
|
||||
# * mg_navigation - runs the local planner and handles move behaviors #
|
||||
# * mg_lidar - optionally runs the lidar node to read opponents #
|
||||
# positions #
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription, GroupAction
|
||||
from launch.conditions import UnlessCondition
|
||||
from launch.substitutions import LaunchConfiguration, PathJoinSubstitution, PythonExpression
|
||||
from launch_ros.actions import Node
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
|
||||
is_local_test = DeclareLaunchArgument(
|
||||
'local_test',
|
||||
default_value="False",
|
||||
description='Launch with simulated components'
|
||||
)
|
||||
|
||||
return LaunchDescription([
|
||||
is_local_test,
|
||||
IncludeLaunchDescription(
|
||||
PathJoinSubstitution([
|
||||
FindPackageShare("mg_control"),
|
||||
'launch',
|
||||
'toid.launch.py'
|
||||
]),
|
||||
launch_arguments={
|
||||
'use_mock': LaunchConfiguration('local_test')
|
||||
}.items()
|
||||
),
|
||||
Node(
|
||||
package="mg_odometry",
|
||||
executable="mg_odom_publisher",
|
||||
name="mg_odom_publisher",
|
||||
condition=UnlessCondition(LaunchConfiguration('local_test')),
|
||||
parameters=[{
|
||||
'odom': "odom",
|
||||
'serial_path': "/dev/ttyACM0",
|
||||
}],
|
||||
|
||||
emulate_tty=True,
|
||||
output='screen'
|
||||
),
|
||||
Node(
|
||||
package="mg_navigation",
|
||||
executable="mg_nav_server",
|
||||
name="mg_nav_server",
|
||||
emulate_tty=True,
|
||||
output='screen',
|
||||
)
|
||||
])
|
||||
|
||||
29
mg_bringup/launch/bt.launch.py
Normal file
29
mg_bringup/launch/bt.launch.py
Normal file
@@ -0,0 +1,29 @@
|
||||
################################################################################
|
||||
# #
|
||||
# Launch file meant to be used on the robot itself #
|
||||
# uses: #
|
||||
# * mg_bt - runs the robot's behavior tree server #
|
||||
# #
|
||||
################################################################################
|
||||
|
||||
from launch import LaunchDescription
|
||||
from launch.substitutions import PathJoinSubstitution
|
||||
from launch_ros.actions import Node
|
||||
from launch_ros.substitutions import FindPackageShare
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
|
||||
basedir = FindPackageShare("mg_bt")
|
||||
|
||||
bt_exec_config = PathJoinSubstitution([basedir, "config/mg_bt_executor.yaml"])
|
||||
|
||||
return LaunchDescription([
|
||||
Node(
|
||||
package='mg_bt',
|
||||
executable='mg_bt_executor',
|
||||
output="screen",
|
||||
parameters=[bt_exec_config]
|
||||
),
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user