@ -1,206 +0,0 @@ | |||
cmake_minimum_required(VERSION 2.8.3) | |||
project(stretch_core) | |||
## Compile as C++11, supported in ROS Kinetic and newer | |||
# add_compile_options(-std=c++11) | |||
## Find catkin macros and libraries | |||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) | |||
## is used, also find other catkin packages | |||
find_package(catkin REQUIRED COMPONENTS | |||
actionlib | |||
actionlib_msgs | |||
geometry_msgs | |||
nav_msgs | |||
control_msgs | |||
trajectory_msgs | |||
rospy | |||
std_msgs | |||
std_srvs | |||
tf | |||
tf2 | |||
) | |||
## System dependencies are found with CMake's conventions | |||
# find_package(Boost REQUIRED COMPONENTS system) | |||
## Uncomment this if the package has a setup.py. This macro ensures | |||
## modules and global scripts declared therein get installed | |||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html | |||
# catkin_python_setup() | |||
################################################ | |||
## Declare ROS messages, services and actions ## | |||
################################################ | |||
## To declare and build messages, services or actions from within this | |||
## package, follow these steps: | |||
## * Let MSG_DEP_SET be the set of packages whose message types you use in | |||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). | |||
## * In the file package.xml: | |||
## * add a build_depend tag for "message_generation" | |||
## * add a build_depend and a exec_depend tag for each package in MSG_DEP_SET | |||
## * If MSG_DEP_SET isn't empty the following dependency has been pulled in | |||
## but can be declared for certainty nonetheless: | |||
## * add a exec_depend tag for "message_runtime" | |||
## * In this file (CMakeLists.txt): | |||
## * add "message_generation" and every package in MSG_DEP_SET to | |||
## find_package(catkin REQUIRED COMPONENTS ...) | |||
## * add "message_runtime" and every package in MSG_DEP_SET to | |||
## catkin_package(CATKIN_DEPENDS ...) | |||
## * uncomment the add_*_files sections below as needed | |||
## and list every .msg/.srv/.action file to be processed | |||
## * uncomment the generate_messages entry below | |||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) | |||
## Generate messages in the 'msg' folder | |||
# add_message_files( | |||
# FILES | |||
# Message1.msg | |||
# Message2.msg | |||
# ) | |||
## Generate services in the 'srv' folder | |||
# add_service_files( | |||
# FILES | |||
# Service1.srv | |||
# Service2.srv | |||
# ) | |||
## Generate actions in the 'action' folder | |||
# add_action_files( | |||
# FILES | |||
# Action1.action | |||
# Action2.action | |||
# ) | |||
## Generate added messages and services with any dependencies listed here | |||
# generate_messages( | |||
# DEPENDENCIES | |||
# actionlib_msgs# geometry_msgs# nav_msgs# std_msgs | |||
# ) | |||
################################################ | |||
## Declare ROS dynamic reconfigure parameters ## | |||
################################################ | |||
## To declare and build dynamic reconfigure parameters within this | |||
## package, follow these steps: | |||
## * In the file package.xml: | |||
## * add a build_depend and a exec_depend tag for "dynamic_reconfigure" | |||
## * In this file (CMakeLists.txt): | |||
## * add "dynamic_reconfigure" to | |||
## find_package(catkin REQUIRED COMPONENTS ...) | |||
## * uncomment the "generate_dynamic_reconfigure_options" section below | |||
## and list every .cfg file to be processed | |||
## Generate dynamic reconfigure parameters in the 'cfg' folder | |||
# generate_dynamic_reconfigure_options( | |||
# cfg/DynReconf1.cfg | |||
# cfg/DynReconf2.cfg | |||
# ) | |||
################################### | |||
## catkin specific configuration ## | |||
################################### | |||
## The catkin_package macro generates cmake config files for your package | |||
## Declare things to be passed to dependent projects | |||
## INCLUDE_DIRS: uncomment this if your package contains header files | |||
## LIBRARIES: libraries you create in this project that dependent projects also need | |||
## CATKIN_DEPENDS: catkin_packages dependent projects also need | |||
## DEPENDS: system dependencies of this project that dependent projects also need | |||
catkin_package( | |||
# INCLUDE_DIRS include | |||
# LIBRARIES stretch_core | |||
# CATKIN_DEPENDS actionlib actionlib_msgs geometry_msgs nav_msgs rospy std_msgs tf tf2 | |||
# DEPENDS system_lib | |||
) | |||
########### | |||
## Build ## | |||
########### | |||
## Specify additional locations of header files | |||
## Your package locations should be listed before other locations | |||
include_directories( | |||
# include | |||
${catkin_INCLUDE_DIRS} | |||
) | |||
## Declare a C++ library | |||
# add_library(${PROJECT_NAME} | |||
# src/${PROJECT_NAME}/stretch_core.cpp | |||
# ) | |||
## Add cmake target dependencies of the library | |||
## as an example, code may need to be generated before libraries | |||
## either from message generation or dynamic reconfigure | |||
# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) | |||
## Declare a C++ executable | |||
## With catkin_make all packages are built within a single CMake context | |||
## The recommended prefix ensures that target names across packages don't collide | |||
# add_executable(${PROJECT_NAME}_node src/stretch_core_node.cpp) | |||
## Rename C++ executable without prefix | |||
## The above recommended prefix causes long target names, the following renames the | |||
## target back to the shorter version for ease of user use | |||
## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" | |||
# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") | |||
## Add cmake target dependencies of the executable | |||
## same as for the library above | |||
# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) | |||
## Specify libraries to link a library or executable target against | |||
# target_link_libraries(${PROJECT_NAME}_node | |||
# ${catkin_LIBRARIES} | |||
# ) | |||
############# | |||
## Install ## | |||
############# | |||
# all install targets should use catkin DESTINATION variables | |||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html | |||
## Mark executable scripts (Python etc.) for installation | |||
## in contrast to setup.py, you can choose the destination | |||
#install(PROGRAMS | |||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | |||
# ) | |||
## Mark executables and/or libraries for installation | |||
# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node | |||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | |||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | |||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | |||
# ) | |||
## Mark cpp header files for installation | |||
# install(DIRECTORY include/${PROJECT_NAME}/ | |||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} | |||
# FILES_MATCHING PATTERN "*.h" | |||
# PATTERN ".svn" EXCLUDE | |||
# ) | |||
## Mark other files for installation (e.g. launch and bag files, etc.) | |||
# install(FILES | |||
# # myfile1 | |||
# # myfile2 | |||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} | |||
# ) | |||
############# | |||
## Testing ## | |||
############# | |||
## Add gtest based cpp test target and link libraries | |||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_stretch_core.cpp) | |||
# if(TARGET ${PROJECT_NAME}-test) | |||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) | |||
# endif() | |||
## Add folders to be run by python nosetests | |||
# catkin_add_nosetests(test) |
@ -1,64 +0,0 @@ | |||
<launch> | |||
<!-- REDUCE RATE AND USE NUC TIME --> | |||
<node name="d435i_accel_correction" pkg="stretch_core" type="d435i_accel_correction" output="screen" /> | |||
<!-- REALSENSE D435i --> | |||
<include file="$(find realsense2_camera)/launch/rs_camera.launch"> | |||
<!-- "The D435i depth camera generates and transmits the gyro and | |||
accelerometer samples independently, as the inertial sensors | |||
exhibit different FPS rates (200/400Hz for gyro, 63/250Hz for | |||
accelerometer)." | |||
https://realsense.intel.com/how-to-getting-imu-data-from-d435i-and-t265/ | |||
https://github.com/intel-ros/realsense | |||
--> | |||
<arg name="accel_fps" value="63"/> | |||
<arg name="gyro_fps" value="200"/> | |||
<arg name="depth_fps" value="15"/> | |||
<arg name="enable_infra1" value="false"/> | |||
<arg name="enable_infra2" value="false"/> | |||
<arg name="enable_accel" value="true"/> | |||
<arg name="depth_width" value="$(arg depth_width)"/> | |||
<arg name="depth_height" value="$(arg depth_height)"/> | |||
<arg name="color_width" value="$(arg color_width)"/> | |||
<arg name="color_height" value="$(arg color_height)"/> | |||
<arg name="color_fps" value="15"/> | |||
<!-- publish depth streams aligned to other streams --> | |||
<arg name="align_depth" value="true"/> | |||
<!-- publish an RGBD point cloud --> | |||
<arg name="filters" value="pointcloud"/> | |||
<!-- "tf_prefix: By default all frame's ids have the same prefix - | |||
camera_. This allows changing it per camera." | |||
https://github.com/intel-ros/realsense --> | |||
<!-- "enable_sync: gathers closest frames of different sensors, | |||
infra red, color and depth, to be sent with the same | |||
timetag. This happens automatically when such filters as | |||
pointcloud are enabled." | |||
https://github.com/intel-ros/realsense --> | |||
<arg name="enable_sync" value="true"/> | |||
<!-- "You can have a full depth to pointcloud, coloring the | |||
regions beyond the texture with zeros..." --> | |||
<!-- Set to true in order to make use of the full field of view of | |||
the depth image instead of being restricted to the field of | |||
view associated with the narrower RGB camera. Note that | |||
points out of the RGB camera's field of view will have their | |||
colors set to 0,0,0. --> | |||
<arg name="allow_no_texture_points" value="true"/> | |||
<!-- "initial_reset: On occasions the device was not closed | |||
properly and due to firmware issues needs to reset. If set to | |||
true, the device will reset prior to usage." | |||
https://github.com/intel-ros/realsense --> | |||
<!--<arg name="initial_reset" value="true"/>--> | |||
<!--<arg name="unite_imu_method" value="copy"/> linear_interpolation--> | |||
</include> | |||
</launch> |
@ -0,0 +1,57 @@ | |||
from launch import LaunchDescription | |||
from launch_ros.actions import Node | |||
from launch.actions import IncludeLaunchDescription, DeclareLaunchArgument | |||
from launch.launch_description_sources import PythonLaunchDescriptionSource | |||
from launch.substitutions import PathJoinSubstitution, LaunchConfiguration | |||
from launch_ros.substitutions import FindPackageShare | |||
# https://github.com/intel-ros/realsense | |||
launch_arguments = {'accel_fps': '63', | |||
'gyro_fps': '200', | |||
'depth_fps': '15', | |||
'enable_infra1': 'false', | |||
'enable_infra2': 'false', | |||
'enable_accel': 'true', | |||
'depth_width': LaunchConfiguration('depth_width'), | |||
'depth_height': LaunchConfiguration('depth_height'), | |||
'color_width': LaunchConfiguration('color_width'), | |||
'color_height': LaunchConfiguration('color_height'), | |||
'color_fps': '15', | |||
# publish depth streams aligned to other streams | |||
'align_depth': 'true', | |||
# publish an RGBD point cloud | |||
'filters': 'pointcloud', | |||
# enable_sync: gathers closest frames of different sensors, | |||
# infra red, color and depth, to be sent with the same | |||
# timetag. This happens automatically when such filters as | |||
# pointcloud are enabled. | |||
'enable_sync': 'true', | |||
# You can have a full depth to pointcloud, coloring the regions beyond the texture with zeros... | |||
# Set to true in order to make use of the full field of view of | |||
# the depth image instead of being restricted to the field of | |||
# view associated with the narrower RGB camera. Note that | |||
# points out of the RGB camera's field of view will have their | |||
# colors set to 0,0,0. | |||
'allow_no_texture_points': 'true'}.items() | |||
def generate_launch_description(): | |||
d435i_accel_correction_node = Node(package='stretch_core', | |||
executable='d435i_accel_correction', | |||
output='screen') | |||
# "The D435i depth camera generates and transmits the gyro and | |||
# accelerometer samples independently, as the inertial sensors | |||
# exhibit different FPS rates (200/400Hz for gyro, 63/250Hz for | |||
# accelerometer)." | |||
# https://realsense.intel.com/how-to-getting-imu-data-from-d435i-and-t265/ | |||
realsense2_camera_node = IncludeLaunchDescription(PythonLaunchDescriptionSource( | |||
PathJoinSubstitution([FindPackageShare('realsense2_camera'), 'config', 'rs_launch.py'])), | |||
launch_arguments=launch_arguments) | |||
return LaunchDescription([DeclareLaunchArgument('depth_width'), | |||
DeclareLaunchArgument('depth_height'), | |||
DeclareLaunchArgument('color_width'), | |||
DeclareLaunchArgument('color_height'), | |||
d435i_accel_correction_node, | |||
realsense2_camera_node]) |
@ -1,16 +0,0 @@ | |||
<launch> | |||
<!-- REALSENSE D435i --> | |||
<include file="$(find stretch_core)/launch/d435i_basic.launch" pass_all_args="true"> | |||
<!-- | |||
HIGHEST RESOLUTION, but also has the highest minimum depth | |||
(280mm Min-Z) below which objects generate bad noise, such as | |||
when the arm and gripper are raised close to the camera. | |||
--> | |||
<arg name="depth_width" value="1280"/> | |||
<arg name="depth_height" value="720"/> | |||
<arg name="color_width" value="1280"/> | |||
<arg name="color_height" value="720"/> | |||
</include> | |||
</launch> |
@ -0,0 +1,18 @@ | |||
from launch import LaunchDescription | |||
from launch.actions import IncludeLaunchDescription | |||
from launch.launch_description_sources import PythonLaunchDescriptionSource | |||
from launch.substitutions import ThisLaunchFileDir, PathJoinSubstitution | |||
# HIGHEST RESOLUTION, but also has the highest minimum depth | |||
# (280mm Min-Z) below which objects generate bad noise, such as | |||
# when the arm and gripper are raised close to the camera. | |||
def generate_launch_description(): | |||
return LaunchDescription( | |||
# REALSENSE D435i | |||
[IncludeLaunchDescription( | |||
PythonLaunchDescriptionSource(PathJoinSubstitution([ThisLaunchFileDir(), 'd435i_basic.launch.py'])), | |||
launch_arguments={'depth_width': '1280', | |||
'depth_height': '720', | |||
'color_width': '1280', | |||
'color_height': '720'}.items())]) |
@ -1,17 +0,0 @@ | |||
<launch> | |||
<!-- REALSENSE D435i --> | |||
<include file="$(find stretch_core)/launch/d435i_basic.launch" pass_all_args="true"> | |||
<!-- | |||
LOWEST RESOLUTION, but also has the lowest minimum depth | |||
(105mm Min-Z) below which objects generate bad noise, such as | |||
when the arm and gripper are raised close to the camera. | |||
--> | |||
<arg name="depth_width" value="424"/> | |||
<arg name="depth_height" value="240"/> | |||
<arg name="color_width" value="424"/> | |||
<arg name="color_height" value="240"/> | |||
</include> | |||
</launch> |
@ -0,0 +1,17 @@ | |||
from launch import LaunchDescription | |||
from launch.actions import IncludeLaunchDescription | |||
from launch.launch_description_sources import PythonLaunchDescriptionSource | |||
from launch.substitutions import ThisLaunchFileDir, PathJoinSubstitution | |||
# LOWEST RESOLUTION, but also has the lowest minimum depth | |||
# (105mm Min-Z) below which objects generate bad noise, such as | |||
# when the arm and gripper are raised close to the camera. | |||
def generate_launch_description(): | |||
return LaunchDescription( | |||
# REALSENSE D435i | |||
[IncludeLaunchDescription( | |||
PythonLaunchDescriptionSource(PathJoinSubstitution([ThisLaunchFileDir(), 'd435i_basic.launch.py'])), | |||
launch_arguments={'depth_width': '424', | |||
'depth_height': '240', | |||
'color_width': '424', | |||
'color_height': '240'}.items())]) |
@ -1,12 +0,0 @@ | |||
<launch> | |||
<!-- imu_filter_madgwick --> | |||
<node name="imu_filter_node" pkg="imu_filter_madgwick" type="imu_filter_node" output="screen"> | |||
<remap from="imu/data_raw" to="/imu_mobile_base"/> | |||
<remap from="imu/mag" to="/magnetometer_mobile_base"/> | |||
<param name="use_mag" value="false"/> | |||
<param name="fixed_frame" value="map"/> | |||
</node> | |||
<!-- --> | |||
</launch> | |||
@ -0,0 +1,14 @@ | |||
from launch import LaunchDescription | |||
from launch_ros.actions import Node | |||
def generate_launch_description(): | |||
return LaunchDescription([ | |||
Node( | |||
package='imu_filter_madgwick', executable='imu_filter_madgwick_node', name='imu_filter', output='screen', | |||
remappings=[('/imu/data_raw', '/imu_mobile_base'), | |||
('/imu/mag', '/magnetometer_mobile_base')], | |||
parameters=[{'use_mag': False, | |||
'fixed_frame': 'map'}] | |||
) | |||
]) |
@ -1,13 +0,0 @@ | |||
<launch> | |||
<!-- STRETCH DRIVER --> | |||
<param name="/stretch_driver/broadcast_odom_tf" type="bool" value="true"/> | |||
<param name="/stretch_driver/fail_out_of_range_goal" type="bool" value="false"/> | |||
<include file="$(find stretch_core)/launch/stretch_driver.launch" pass_all_args="true"/> | |||
<!-- --> | |||
<!-- KEYBOARD TELEOP --> | |||
<node name="keyboard_teleop" pkg="stretch_core" type="keyboard_teleop" output="screen" args=''/> | |||
<!-- --> | |||
</launch> |
@ -0,0 +1,18 @@ | |||
from launch import LaunchDescription | |||
from launch.actions import IncludeLaunchDescription | |||
from launch.launch_description_sources import PythonLaunchDescriptionSource | |||
from launch_ros.actions import Node | |||
from launch.substitutions import ThisLaunchFileDir, PathJoinSubstitution | |||
def generate_launch_description(): | |||
return LaunchDescription([ | |||
# STRETCH DRIVER | |||
IncludeLaunchDescription( | |||
PythonLaunchDescriptionSource(PathJoinSubstitution([ThisLaunchFileDir(), 'stretch_driver.launch.py'])), | |||
launch_arguments={'broadcast_odom_tf': 'true', | |||
'fail_out_of_range_goal': 'false'}.items()), | |||
# KEYBOARD TELEOP | |||
Node(package='stretch_core', | |||
executable='keyboard_teleop', | |||
output='screen')]) |
@ -1,8 +0,0 @@ | |||
<launch> | |||
<!-- ARUCO MARKER DETECTOR --> | |||
<rosparam command="load" file="$(find stretch_core)/config/stretch_marker_dict.yaml" /> | |||
<node name="detect_aruco_markers" pkg="stretch_core" type="detect_aruco_markers" output="screen"/> | |||
<!-- --> | |||
</launch> |
@ -0,0 +1,16 @@ | |||
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(): | |||
# ARUCO MARKER DETECTOR | |||
return LaunchDescription([Node(package='stretch_core', | |||
executable='detect_aruco_markers', | |||
output='screen', | |||
parameters=[PathJoinSubstitution([FindPackageShare('stretch_core'), | |||
'config', | |||
'stretch_marker_dict.yaml'])] | |||
) | |||
]) |
@ -1,44 +0,0 @@ | |||
<launch> | |||
<param name="robot_description" textfile="$(find stretch_description)/urdf/stretch.urdf" /> | |||
<arg name="calibrated_controller_yaml_file" value="$(find stretch_core)/config/controller_calibration_head.yaml"/> | |||
<node | |||
name="joint_state_publisher" | |||
pkg="joint_state_publisher" | |||
type="joint_state_publisher" > | |||
<param name="rate" value="15.0"/> | |||
<rosparam param="source_list"> | |||
[/stretch/joint_states] | |||
</rosparam> | |||
</node> | |||
<!-- GUI WITH JOINT SLIDERS --> | |||
<!-- | |||
<node | |||
name="joint_state_publisher_gui" | |||
pkg="joint_state_publisher_gui" | |||
type="joint_state_publisher_gui" > | |||
<param name="rate" value="15.0"/> | |||
<rosparam param="source_list"> | |||
[/stretch/joint_states] | |||
</rosparam> | |||
</node> | |||
--> | |||
<node | |||
name="robot_state_publisher" | |||
pkg="robot_state_publisher" | |||
type="robot_state_publisher" > | |||
<param name="publish_frequency" value="15.0"/> | |||
</node> | |||
<node name="stretch_driver" pkg="stretch_core" type="stretch_driver" output="screen"> | |||
<param name="rate" type="double" value="25.0"/> | |||
<param name="timeout" type="double" value="0.5"/> | |||
<remap from="cmd_vel" to="/stretch/cmd_vel" /> | |||
<remap from="joint_states" to="/stretch/joint_states" /> | |||
<param name="controller_calibration_file" type="string" value="$(arg calibrated_controller_yaml_file)"/> | |||
</node> | |||
</launch> |
@ -0,0 +1,49 @@ | |||
import os | |||
from ament_index_python.packages import get_package_share_directory | |||
from launch import LaunchDescription | |||
from launch_ros.actions import Node | |||
from launch.substitutions import LaunchConfiguration | |||
from launch.actions import DeclareLaunchArgument | |||
import xacro | |||
def generate_launch_description(): | |||
robot_description_path = os.path.join(get_package_share_directory('stretch_description'), | |||
'urdf', | |||
'stretch.urdf') | |||
calibrated_controller_yaml_file = os.path.join(get_package_share_directory('stretch_core'), | |||
'config', | |||
'controller_calibration_head.yaml') | |||
joint_state_publisher = Node(package='joint_state_publisher', | |||
executable='joint_state_publisher', | |||
name='joint_state_publisher', | |||
arguments=[robot_description_path], | |||
output='log', | |||
parameters=[{'source_list': ["/stretch/joint_states"]}, | |||
{'rate': 15}]) | |||
robot_state_publisher = Node(package='robot_state_publisher', | |||
executable='robot_state_publisher', | |||
name='robot_state_publisher', | |||
output='both', | |||
parameters=[{'robot_description': xacro.process_file(robot_description_path).toxml()}, | |||
{'publish_frequency': 15}]) | |||
stretch_driver = Node(package='stretch_core', | |||
executable='stretch_driver', | |||
name='stretch_driver', | |||
remappings=[('cmd_vel', '/stretch/cmd_vel'), | |||
('joint_states', '/stretch/joint_states')], | |||
parameters=[{'rate': 25.0}, | |||
{'timeout': 0.5}, | |||
{'controller_calibration_file': calibrated_controller_yaml_file}, | |||
{'broadcast_odom_tf': LaunchConfiguration('broadcast_odom_tf')}, | |||
{'fail_out_of_range_goal': LaunchConfiguration('fail_out_of_range_goal')}]) | |||
return LaunchDescription([DeclareLaunchArgument('broadcast_odom_tf'), | |||
DeclareLaunchArgument('fail_out_of_range_goal'), | |||
joint_state_publisher, | |||
robot_state_publisher, | |||
stretch_driver]) |
@ -1,13 +0,0 @@ | |||
<launch> | |||
<node pkg="robot_localization" type="ekf_localization_node" name="ekf_se" clear_params="true"> | |||
<rosparam command="load" file="$(find stretch_core)/launch/stretch_ekf.yaml" /> | |||
<!-- Placeholder for output topic remapping | |||
<remap from="odometry/filtered" to=""/> | |||
<remap from="accel/filtered" to=""/> | |||
--> | |||
</node> | |||
</launch> |
@ -0,0 +1,19 @@ | |||
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(): | |||
return LaunchDescription([Node(package='robot_localization', | |||
executable='ekf_node', | |||
parameters=[PathJoinSubstitution([FindPackageShare('stretch_core'), | |||
'launch', | |||
'stretch_ekf.yaml'])], | |||
remappings=[ | |||
# Placeholder for output topic remapping | |||
# ('odometry/filtered', ''), | |||
# ('accel/filtered', '') | |||
]) | |||
] | |||
) |
@ -1,32 +0,0 @@ | |||
<launch> | |||
<arg name="urdf_file" value="$(find stretch_description)/urdf/stretch.urdf"/> | |||
<arg name="controller_yaml_file" value="$(find stretch_core)/config/controller_calibration_head.yaml"/> | |||
<arg name="calibration_directory" value="$(env HELLO_FLEET_PATH)/$(env HELLO_FLEET_ID)/calibration_ros/"/> | |||
<!-- REALSENSE D435i --> | |||
<include file="$(find stretch_core)/launch/d435i_low_resolution.launch" /> | |||
<node name="d435i_configure" pkg="stretch_core" type="d435i_configure" output="screen" > | |||
<param name="initial_mode" type="string" value="High Accuracy"/> | |||
</node> | |||
<!-- --> | |||
<!-- STRETCH DRIVER --> | |||
<param name="/stretch_driver/broadcast_odom_tf" type="bool" value="true"/> | |||
<param name="/stretch_driver/fail_out_of_range_goal" type="bool" value="false"/> | |||
<include file="$(find stretch_core)/launch/stretch_driver.launch" pass_all_args="true"/> | |||
<!-- --> | |||
<!-- LASER RANGE FINDER --> | |||
<include file="$(find stretch_core)/launch/rplidar.launch" /> | |||
<!-- --> | |||
<!-- KEYBOARD TELEOP --> | |||
<node name="keyboard_teleop" pkg="stretch_core" type="keyboard_teleop" output="screen" args=''/> | |||
<!-- --> | |||
<!-- VISUALIZE --> | |||
<node name="rviz" pkg="rviz" type="rviz" output="screen" args="-d $(find stretch_core)/rviz/wheel_odometry_test.rviz" /> | |||
<!-- --> | |||
</launch> |
@ -0,0 +1,73 @@ | |||
from launch import LaunchDescription | |||
from launch_ros.actions import Node | |||
from launch.actions import IncludeLaunchDescription, DeclareLaunchArgument | |||
from launch.launch_description_sources import PythonLaunchDescriptionSource | |||
from launch.substitutions import PathJoinSubstitution, LaunchConfiguration, EnvironmentVariable, ThisLaunchFileDir | |||
from launch_ros.substitutions import FindPackageShare | |||
# TODO(JafarAbdi): Check if the following args are needed, they're not being used | |||
configurable_parameters = [ | |||
{'name': 'urdf_file', 'default': PathJoinSubstitution([FindPackageShare('stretch_description'), | |||
'urdf', | |||
'stretch.urdf'])}, | |||
{'name': 'controller_yaml_file', 'default': PathJoinSubstitution([FindPackageShare('stretch_core'), | |||
'config', | |||
'controller_calibration_head.yaml'])}, | |||
{'name': 'calibration_directory', 'default': PathJoinSubstitution([EnvironmentVariable('HELLO_FLEET_PATH'), | |||
EnvironmentVariable('HELLO_FLEET_ID'), | |||
'calibration_ros'])}] | |||
def declare_configurable_parameters(parameters): | |||
return [DeclareLaunchArgument(param['name'], default_value=param['default']) for param in parameters] | |||
def set_configurable_parameters(parameters): | |||
return dict([(param['name'], LaunchConfiguration(param['name'])) for param in parameters]) | |||
def generate_launch_description(): | |||
# REALSENSE D435i | |||
d435i_low_resolution_launch_description = IncludeLaunchDescription( | |||
PythonLaunchDescriptionSource(PathJoinSubstitution([ThisLaunchFileDir(), 'd435i_low_resolution.launch.py']))) | |||
d435i_configure_node = Node(package='stretch_core', | |||
executable='d435i_configure', | |||
output='screen', | |||
parameters=[{'initial_mode': 'High Accuracy'}] | |||
) | |||
# STRETCH DRIVER | |||
stretch_driver_launch_description = IncludeLaunchDescription( | |||
PythonLaunchDescriptionSource(PathJoinSubstitution([ThisLaunchFileDir(), 'stretch_driver.launch.py'])), | |||
launch_arguments={'broadcast_odom_tf': 'true', | |||
'fail_out_of_range_goal': 'false'}.items()) | |||
# TODO(JafarAbdi): This's not ported yet to ROS2 | |||
# LASER RANGE FINDER | |||
# rplidar_launch_description = IncludeLaunchDescription( | |||
# PythonLaunchDescriptionSource(PathJoinSubstitution([ThisLaunchFileDir(), 'rplidar.launch.py']))) | |||
# KEYBOARD TELEOP | |||
keyboard_teleop_node = Node(package='stretch_core', | |||
executable='keyboard_teleop', | |||
output='screen' | |||
) | |||
# VISUALIZE | |||
rviz_config_file = PathJoinSubstitution([FindPackageShare('stretch_core'), | |||
'rviz', | |||
'wheel_odometry_test.rviz']) | |||
rviz_node = Node(package='rviz2', | |||
executable='rviz2', | |||
name='rviz2', | |||
output='screen', | |||
arguments=['-d', rviz_config_file] | |||
) | |||
return LaunchDescription(declare_configurable_parameters(configurable_parameters) + | |||
[d435i_low_resolution_launch_description, | |||
d435i_configure_node, | |||
stretch_driver_launch_description, | |||
keyboard_teleop_node, | |||
rviz_node]) |
@ -0,0 +1,4 @@ | |||
[develop] | |||
script-dir=$base/lib/stretch_core | |||
[install] | |||
install-scripts=$base/lib/stretch_core |
@ -0,0 +1,34 @@ | |||
from setuptools import setup, find_packages | |||
from glob import glob | |||
package_name = 'stretch_core' | |||
setup( | |||
name=package_name, | |||
version='0.2.0', | |||
packages=find_packages(), | |||
data_files=[ | |||
('share/ament_index/resource_index/packages', ['resource/' + package_name]), | |||
('share/' + package_name, ['package.xml']), | |||
('share/' + package_name + '/launch', glob('launch/*.launch.py')), | |||
('share/' + package_name + '/launch', ['launch/stretch_ekf.yaml']), | |||
('share/' + package_name + '/config', glob('config/*')) | |||
], | |||
install_requires=['setuptools'], | |||
url='', | |||
license='', | |||
author='Hello Robot Inc.', | |||
author_email='support@hello-robot.com', | |||
description='The stretch_core package', | |||
entry_points={ | |||
'console_scripts': [ | |||
'd435i_accel_correction = stretch_core.d435i_accel_correction:main', | |||
'd435i_configure = stretch_core.d435i_configure:main', | |||
'd435i_frustum_visualizer = stretch_core.d435i_frustum_visualizer:main', | |||
'detect_aruco_markers = stretch_core.detect_aruco_markers:main', | |||
'keyboard = stretch_core.keyboard:main', | |||
'keyboard_teleop = stretch_core.keyboard_teleop:main', | |||
'stretch_driver = stretch_core.stretch_driver:main', | |||
], | |||
}, | |||
) |