* Added primary stepper motor driver code to repo * Added odometery encoder code to repo * Added the ability to update encoder wheel ratio via ros service Co-authored-by: Pimpest <82343504+Pimpest@users.noreply.github.com> Co-committed-by: Pimpest <82343504+Pimpest@users.noreply.github.com>
51 lines
1.5 KiB
Python
51 lines
1.5 KiB
Python
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',
|
|
'launch.py'
|
|
]),
|
|
launch_arguments={
|
|
'local_test': 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',
|
|
)
|
|
])
|
|
|