forked from sabotagelab/f110-skeletons-spring2019
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
695 changed files
with
174,226 additions
and
6 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
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,2 +1,49 @@ | ||
# f110-skeletons-spring2019 | ||
Skeleton code for F1/10 class | ||
# f110-fall2018-course | ||
Skeleton codes for F110 Fall 2018 course at UPenn. | ||
|
||
In order to add the contents of this repository to your workspace on your local machine, do the following: | ||
|
||
Clone this repository into a folder on your computer | ||
```bash | ||
$ cd ~/sandbox (or whatever folder you want to work in) | ||
$ git clone https://github.com/mlab-upenn/f110-fall2018-skeletons.git | ||
``` | ||
|
||
We begin by creating a workspace. You can call your workspace anything, for the purposes of this setup guide we call our workspace f110_ws. In your root folder, execute these commands: | ||
```bash | ||
$ mkdir -p ~/f110_ws/src | ||
``` | ||
|
||
Copy the contents of this repository into ~/f110_ws/src | ||
```bash | ||
$ cp -r f110-fall2018-skeletons f110_ws/src | ||
``` | ||
|
||
You will need to install these with apt-get in order for the car and Gazebo simulator to work. | ||
```bash | ||
$ sudo apt-get install ros-kinetic-ros-control ros-kinetic-ros-controllers ros-kinetic-gazebo-ros-control ros-kinetic-ackermann-msgs ros-kinetic-joy | ||
``` | ||
|
||
Make all the Python scripts executable (by default they are set to non-executable when downloaded from Github, or anywhere for that matter) | ||
```bash | ||
find . -name "*.py" -exec chmod +x {} \; | ||
``` | ||
|
||
Then build: | ||
```bash | ||
$ cd ~/f110_ws | ||
$ catkin_make | ||
``` | ||
|
||
The generated devel and build folders at the root of the workspace are where the linked libraries and the compiled code in machine language resides. Source the environment using | ||
```bash | ||
$ source devel/setup.bash | ||
``` | ||
|
||
You can now run a launch file using the following. | ||
```bash | ||
$ roslaunch gap_finding gap_finding_sim.launch | ||
``` | ||
|
||
TROUBLESHOOTING | ||
If for some reason you get a build error, try deleting the CMakeLists.txt file and running catkin_make again. |
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,19 @@ | ||
<launch> | ||
<param name="robot_description" command="$(find xacro)/xacro '$(find f110_description)/urdf/F110.xacro'" /> | ||
<node name="robot_state_publisher" pkg="robot_state_publisher" | ||
type="robot_state_publisher" /> | ||
|
||
<node name="cartographer_node" pkg="cartographer_ros" | ||
type="cartographer_node" args=" | ||
-configuration_directory /home/nvidia/cartographer_ws/src/cartographer_ros/cartographer_ros/configuration_files | ||
-configuration_basename f110_2d.lua"> | ||
<remap from="odom" to="/vesc/odom" /> | ||
<remap from="imu" to="/imu/data" /> | ||
</node> | ||
|
||
<node name="cartographer_occupancy_grid_node" pkg="cartographer_ros" | ||
type="cartographer_occupancy_grid_node" args="-resolution 0.05" /> | ||
|
||
|
||
|
||
</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,43 @@ | ||
include "map_builder.lua" | ||
include "trajectory_builder.lua" | ||
|
||
options = { | ||
map_builder = MAP_BUILDER, | ||
trajectory_builder = TRAJECTORY_BUILDER, | ||
map_frame = "map", | ||
tracking_frame = "base_link", | ||
published_frame = "base_link", | ||
odom_frame = "odom", | ||
provide_odom_frame = false, | ||
use_odometry = true, | ||
use_nav_sat = false, | ||
num_laser_scans = 1, | ||
num_multi_echo_laser_scans = 0, | ||
num_subdivisions_per_laser_scan = 1, | ||
num_point_clouds = 0, | ||
lookup_transform_timeout_sec = 0.2, | ||
submap_publish_period_sec = 0.3, | ||
pose_publish_period_sec = 5e-3, | ||
trajectory_publish_period_sec = 30e-3, | ||
rangefinder_sampling_ratio = 1., | ||
odometry_sampling_ratio = 1., | ||
fixed_frame_pose_sampling_ratio = 1., | ||
imu_sampling_ratio = 1., | ||
use_landmarks = false, | ||
publish_frame_projected_to_2d = false, | ||
landmarks_sampling_ratio = 1., | ||
} | ||
|
||
MAP_BUILDER.use_trajectory_builder_2d = true | ||
MAP_BUILDER.use_trajectory_builder_3d = false | ||
MAP_BUILDER.num_background_threads = 5.0 | ||
TRAJECTORY_BUILDER_2D.use_imu_data = false | ||
TRAJECTORY_BUILDER_2D.max_range = 25.0 | ||
TRAJECTORY_BUILDER_2D.min_range = 0.5 | ||
|
||
-- might be able to optimize these parameters | ||
-- see: http://google-cartographer-ros.readthedocs.io/en/latest/tuning.html | ||
TRAJECTORY_BUILDER_2D.submaps.num_range_data = 100 | ||
POSE_GRAPH.optimize_every_n_nodes = 20 | ||
|
||
return options |
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,21 @@ | ||
<launch> | ||
<param name="robot_description" command="$(find xacro)/xacro '$(find f110_description)/urdf/F110.xacro'" /> | ||
<node name="robot_state_publisher" pkg="robot_state_publisher" | ||
type="robot_state_publisher" /> | ||
|
||
<node name="cartographer_node" pkg="cartographer_ros" | ||
type="cartographer_node" args=" | ||
-configuration_directory /home/nvidia/cartographer_ws/src/cartographer_ros/cartographer_ros/configuration_files | ||
-configuration_basename f110_2d.lua"> | ||
<remap from="odom" to="/vesc/odom" /> | ||
<remap from="imu" to="/imu/data" /> | ||
</node> | ||
|
||
<node name="cartographer_occupancy_grid_node" pkg="cartographer_ros" | ||
type="cartographer_occupancy_grid_node" args="-resolution 0.05" /> | ||
|
||
<node name="rviz" pkg="rviz" type="rviz" required="true" | ||
args="-d /home/nvidia/cartographer_ws/src/cartographer_ros/cartographer_ros/configuration_files/demo_2d.rviz" /> | ||
|
||
|
||
</launch> |
Binary file not shown.
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,181 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(f110_description) | ||
|
||
## 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) | ||
|
||
## 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 run_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 run_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 | ||
# std_msgs # Or other packages containing 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 run_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 you 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 racecar_description | ||
# CATKIN_DEPENDS other_catkin_pkg | ||
# DEPENDS system_lib | ||
) | ||
|
||
########### | ||
## Build ## | ||
########### | ||
|
||
## Specify additional locations of header files | ||
## Your package locations should be listed before other locations | ||
# include_directories(include) | ||
|
||
## Declare a C++ library | ||
# add_library(racecar_description | ||
# src/${PROJECT_NAME}/racecar_description.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(racecar_description ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) | ||
|
||
## Declare a C++ executable | ||
# add_executable(racecar_description_node src/racecar_description_node.cpp) | ||
|
||
## Add cmake target dependencies of the executable | ||
## same as for the library above | ||
# add_dependencies(racecar_description_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) | ||
|
||
## Specify libraries to link a library or executable target against | ||
# target_link_libraries(racecar_description_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 | ||
# scripts/my_python_script | ||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
# ) | ||
|
||
## Mark executables and/or libraries for installation | ||
# install(TARGETS racecar_description racecar_description_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_racecar_description.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) |
Binary file not shown.
Oops, something went wrong.