Skip to content

Commit

Permalink
Merge pull request #20 from westonrobot/bugfix-launch
Browse files Browse the repository at this point in the history
Bugfix launch
  • Loading branch information
hanskw-weston authored Jun 11, 2024
2 parents 44df3a8 + 6079e5b commit 9a53352
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
10 changes: 5 additions & 5 deletions wrp_sdk_robot/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ find_package(tf2_geometry_msgs REQUIRED)
find_package(wrp_sdk_msgs REQUIRED)
find_package(wrp_sdk 1.3 REQUIRED)

add_executable(mobile_robot_base_node
add_executable(mobile_base_node
src/mobile_base_node.cpp
)
target_link_libraries(mobile_robot_base_node
target_link_libraries(mobile_base_node
westonrobot::wrp_sdk_robot
)
target_include_directories(mobile_robot_base_node PUBLIC
target_include_directories(mobile_base_node PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>)
ament_target_dependencies(mobile_robot_base_node
ament_target_dependencies(mobile_base_node
rclcpp
rclcpp_components
wrp_sdk_msgs
Expand All @@ -47,7 +47,7 @@ ament_target_dependencies(mobile_robot_base_node
)

install(TARGETS
mobile_robot_base_node
mobile_base_node
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION lib/${PROJECT_NAME}
Expand Down
2 changes: 0 additions & 2 deletions wrp_sdk_robot/launch/mobile_base/mobile_base.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ def generate_launch_description():
"use_sim_time", default_value="false",
description='Use simulation clock if true')

# "weston" == weston robot base
# "agilex" == agilexV2 robot base
robot_type_launch_arg = DeclareLaunchArgument(
"robot_type", default_value="0",
description="Mobile base robot type, Refer to README.md for more details."
Expand Down
27 changes: 27 additions & 0 deletions wrp_sdk_robot/launch/mobile_base/robooterx.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import os
from launch import LaunchDescription
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from ament_index_python.packages import get_package_share_directory


def generate_launch_description():
ld = LaunchDescription()

mobile_base_robooterx_node = IncludeLaunchDescription(
PythonLaunchDescriptionSource([os.path.join(get_package_share_directory("wrp_sdk_robot"),
"launch",
"mobile_base",
"mobile_base.launch.py")]),
launch_arguments={
"robot_type": "13",
"can_device": "can0",
"base_frame": "base_link",
"odom_frame": "odom",
"auto_reconnect": "true",
"publish_odom_tf": "true",
}.items(),
)

ld.add_action(mobile_base_robooterx_node)
return ld

0 comments on commit 9a53352

Please sign in to comment.