This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from Autonomous-Motorsports-Purdue/migrate_kar…
…t_to_sim Migrate Kart Launch Architecture to Simulation Launches
- Loading branch information
Showing
10 changed files
with
153 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
69 changes: 69 additions & 0 deletions
69
src/kart_2dnav/launch/archived/sim_autocross_track_only_goal_setting.launch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
Simulate a carlike robot with the teb_local_planner in stage: | ||
- stage | ||
- map_server | ||
- move_base | ||
- static map | ||
- amcl | ||
- rviz view | ||
--> | ||
<launch> | ||
|
||
<!-- ************** Global Parameters *************** --> | ||
<param name="/use_sim_time" value="true"/> | ||
|
||
<!-- ************** Stage Simulator *************** --> | ||
<node pkg="stage_ros" type="stageros" name="stageros" args="$(find kart_2dnav)/stage/autocross_track.world"> | ||
<!-- Use top/scan to match naming used for output scan topic from pointcloud_to_laserscan --> | ||
<remap from="base_scan" to="top/scan"/> | ||
</node> | ||
|
||
<!-- ************** ROS Navigation Stack (move_base) *************** --> | ||
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"> | ||
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/costmap_common_params.yaml" command="load" ns="global_costmap" /> | ||
<!-- Modified teb_local_planner_tutorials version to set laserscan input to move_base come from top/scan --> | ||
<rosparam file="$(find kart_2dnav)/params/sim_params/costmap_common_params.yaml" command="load" ns="local_costmap" /> | ||
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/local_costmap_params.yaml" command="load" /> | ||
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/global_costmap_params.yaml" command="load" /> | ||
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/teb_local_planner_params.yaml" command="load" /> | ||
|
||
<param name="base_global_planner" value="global_planner/GlobalPlanner" /> | ||
<param name="planner_frequency" value="1.0" /> | ||
<param name="planner_patience" value="5.0" /> | ||
|
||
<param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" /> | ||
<param name="controller_frequency" value="5.0" /> | ||
<param name="controller_patience" value="15.0" /> | ||
|
||
<!-- Our carlike robot is not able to rotate in place --> | ||
<param name="clearing_rotation_allowed" value="false" /> | ||
</node> | ||
|
||
<!-- Run the goal setting script to navigate in SLAM mode --> | ||
<node pkg="slam_mode_goal" type="slam_mode_goal" name="slam_mode_goal" output="screen"> | ||
</node> | ||
|
||
<!-- MICROCONTROLLER COMM --> | ||
<!-- Run the communication script to enable and start communicating with microcontroller --> | ||
<node pkg="ti_comm" type="ti_comm_node" name="ti_comm_node" output="screen" /> | ||
|
||
<!-- ****** Use a Known (Static) Map ***** --> | ||
<node name="map_server" pkg="map_server" type="map_server" args="$(find kart_2dnav)/maps/autocross.yaml" output="screen"> | ||
<param name="frame_id" value="map"/> | ||
</node> | ||
|
||
<node pkg="amcl" type="amcl" name="amcl" output="screen"> | ||
<!-- Change default subscribed scan topic from scan to top/scan --> | ||
<remap from="scan" to="top/scan"/> | ||
|
||
<param name="initial_pose_x" value="4"/> | ||
<param name="initial_pose_y" value="1.5"/> | ||
<param name="initial_pose_a" value="0"/> | ||
</node> | ||
|
||
<!-- **************** Visualisation **************** --> | ||
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find teb_local_planner_tutorials)/cfg/rviz_navigation.rviz"/> | ||
|
||
</launch> |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,66 @@ | ||
<?xml version="1.0"?> | ||
|
||
<!-- | ||
Simulate a carlike robot with the teb_local_planner in stage: | ||
- stage | ||
- map_server | ||
- move_base | ||
- static map | ||
- amcl | ||
- rviz view | ||
--> | ||
<launch> | ||
|
||
<!-- ************** Global Parameters *************** --> | ||
<!-- SIMULATION CONFIGURATION --> | ||
<param name="/use_sim_time" value="true"/> | ||
|
||
<!-- ************** Stage Simulator *************** --> | ||
<node pkg="stage_ros" type="stageros" name="stageros" args="$(find kart_2dnav)/stage/autocross_track.world"> | ||
<!-- Use top/scan to match naming used for output scan topic from pointcloud_to_laserscan --> | ||
<!-- Launch the RViz simulation --> | ||
<node pkg="stage_ros_mod_tf" type="stage_ros_mod_tf_node" | ||
name="stage_ros_mod_tf_node" | ||
args="$(find kart_2dnav)/stage/autocross_track.world"> | ||
<!-- Remap the scan topic to top/scan to match naming used for output | ||
scan topic from pointcloud_to_laserscan --> | ||
<remap from="base_scan" to="top/scan"/> | ||
</node> | ||
|
||
<!-- ************** ROS Navigation Stack (move_base) *************** --> | ||
<node pkg="move_base" type="move_base" respawn="false" name="move_base" output="screen"> | ||
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/costmap_common_params.yaml" command="load" ns="global_costmap" /> | ||
<!-- Modified teb_local_planner_tutorials version to set laserscan input to move_base come from top/scan --> | ||
<rosparam file="$(find kart_2dnav)/params/sim_params/costmap_common_params.yaml" command="load" ns="local_costmap" /> | ||
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/local_costmap_params.yaml" command="load" /> | ||
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/global_costmap_params.yaml" command="load" /> | ||
<rosparam file="$(find teb_local_planner_tutorials)/cfg/carlike/teb_local_planner_params.yaml" command="load" /> | ||
|
||
<param name="base_global_planner" value="global_planner/GlobalPlanner" /> | ||
<param name="planner_frequency" value="1.0" /> | ||
<param name="planner_patience" value="5.0" /> | ||
|
||
<param name="base_local_planner" value="teb_local_planner/TebLocalPlannerROS" /> | ||
<param name="controller_frequency" value="5.0" /> | ||
<param name="controller_patience" value="15.0" /> | ||
<!-- LASER ODOMETRY --> | ||
<!-- This node is responsible for taking incremental 2D laserscans (/top/scan) | ||
and outputting estimated odometry information as a tf (odom->base_link) | ||
and by publishing nav_msgs/Odometry messages to the /odom topic. --> | ||
<node pkg="laser_scan_matcher_odom" type="laser_scan_matcher_node_odom" | ||
name="laser_scan_matcher_node_odom" output="screen"> | ||
<remap from="scan" to="/top/scan" /> | ||
<rosparam file="$(find kart_2dnav)/params/laser_scan_matcher_params.yaml" | ||
command="load" /> | ||
</node> | ||
|
||
<!-- Our carlike robot is not able to rotate in place --> | ||
<param name="clearing_rotation_allowed" value="false" /> | ||
</node> | ||
<!-- SLAM: LOCALIZATION & MAPPING --> | ||
<!-- Run the SLAM package, HectorMapping, that takes in 2D laser scans | ||
(/top/scan) and publishes topics for the created map (/map) and | ||
estimated pose (/slam_out_pose) of the kart relative to the map. | ||
This node is also responsible for publishing the tf map->odom. --> | ||
<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen"> | ||
<remap from="scan" to="/top/scan" /> | ||
<rosparam file="$(find kart_2dnav)/params/hector_mapping_params.yaml" command="load" /> | ||
</node> | ||
|
||
<!-- Run the goal setting script to navigate in SLAM mode --> | ||
<!-- GOAL SETTING --> | ||
<!-- Run the goal setting algorithm to navigate without a preliminary map (lap 1). | ||
This node takes 2D laser scans (/top/scan) then constructs a goal message and | ||
creates an ActionClient to sends the goal as ROS actions to SimpleActionServer | ||
on move_base. --> | ||
<!-- TODO: Figure out how to incorporate ROS params with goal setting script --> | ||
<node pkg="slam_mode_goal" type="slam_mode_goal" name="slam_mode_goal" output="screen"> | ||
</node> | ||
|
||
<!-- ROS NAVIGATION STACK --> | ||
<!-- Configure and run move_base to set up the ROS Navigation Stack. --> | ||
<!-- More details on inputs/outputs can be found in move_base.launch --> | ||
<include file="$(find kart_2dnav)/launch/move_base.launch" /> | ||
|
||
<!-- MICROCONTROLLER COMM --> | ||
<!-- Run the communication script to enable and start communicating with microcontroller --> | ||
<!-- Run the communication script to enable and start communicating with the | ||
microcontroller. This node subscribed to the /cmd_vel topic published by | ||
move_base and then then sends packets containing the velocity and steering | ||
angle to the MCU over a serial connection. --> | ||
<node pkg="ti_comm" type="ti_comm_node" name="ti_comm_node" output="screen" /> | ||
|
||
<!-- ****** Use a Known (Static) Map ***** --> | ||
<node name="map_server" pkg="map_server" type="map_server" args="$(find kart_2dnav)/maps/autocross.yaml" output="screen"> | ||
<param name="frame_id" value="map"/> | ||
</node> | ||
|
||
<node pkg="amcl" type="amcl" name="amcl" output="screen"> | ||
<!-- Change default subscribed scan topic from scan to top/scan --> | ||
<remap from="scan" to="top/scan"/> | ||
|
||
<param name="initial_pose_x" value="4"/> | ||
<param name="initial_pose_y" value="1.5"/> | ||
<param name="initial_pose_a" value="0"/> | ||
</node> | ||
<!-- Launch rviz with the configuration file in order to visualize incoming data | ||
<!-- **************** Visualisation **************** --> | ||
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find teb_local_planner_tutorials)/cfg/rviz_navigation.rviz"/> | ||
Note: This should only be set when running the system with simulated | ||
sensor data (rosbags). | ||
--> | ||
<node name="rviz" pkg="rviz" type="rviz" | ||
args="-d $(find kart_2dnav)/params/kart_rviz.rviz" /> | ||
|
||
</launch> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters