Skip to content

Commit 0f0523d

Browse files
committed
Initial commit
1 parent 8b65231 commit 0f0523d

File tree

10 files changed

+1667
-2
lines changed

10 files changed

+1667
-2
lines changed

CMakeLists.txt

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
cmake_minimum_required(VERSION 2.8.3)
2+
project(dll)
3+
4+
## Find catkin macros and libraries
5+
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
6+
## is used, also find other catkin packages
7+
set(CMAKE_CXX_STANDARD 11)
8+
find_package(catkin REQUIRED COMPONENTS
9+
roscpp
10+
std_msgs
11+
tf
12+
geometry_msgs
13+
pcl_conversions
14+
pcl_ros
15+
octomap_ros
16+
nav_msgs
17+
)
18+
19+
# Ceres solver
20+
find_package(Ceres REQUIRED)
21+
22+
## Uncomment this if the package has a setup.py. This macro ensures
23+
## modules and global scripts declared therein get installed
24+
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
25+
# catkin_python_setup()
26+
27+
################################################
28+
## Declare ROS messages, services and actions ##
29+
################################################
30+
31+
## To declare and build messages, services or actions from within this
32+
## package, follow these steps:
33+
## * Let MSG_DEP_SET be the set of packages whose message types you use in
34+
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
35+
## * In the file package.xml:
36+
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
37+
## * If MSG_DEP_SET isn't empty the following dependencies might have been
38+
## pulled in transitively but can be declared for certainty nonetheless:
39+
## * add a build_depend tag for "message_generation"
40+
## * add a run_depend tag for "message_runtime"
41+
## * In this file (CMakeLists.txt):
42+
## * add "message_generation" and every package in MSG_DEP_SET to
43+
## find_package(catkin REQUIRED COMPONENTS ...)
44+
## * add "message_runtime" and every package in MSG_DEP_SET to
45+
## catkin_package(CATKIN_DEPENDS ...)
46+
## * uncomment the add_*_files sections below as needed
47+
## and list every .msg/.srv/.action file to be processed
48+
## * uncomment the generate_messages entry below
49+
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
50+
51+
## Generate messages in the 'msg' folder
52+
# add_message_files(
53+
# FILES
54+
# Message1.msg
55+
# Message2.msg
56+
# )
57+
58+
## Generate services in the 'srv' folder
59+
# add_service_files(
60+
# FILES
61+
# Service1.srv
62+
# Service2.srv
63+
# )
64+
65+
## Generate actions in the 'action' folder
66+
# add_action_files(
67+
# FILES
68+
# Action1.action
69+
# Action2.action
70+
# )
71+
72+
## Generate added messages and services with any dependencies listed here
73+
# generate_messages(
74+
# DEPENDENCIES
75+
# std_msgs
76+
# )
77+
78+
###################################
79+
## catkin specific configuration ##
80+
###################################
81+
## The catkin_package macro generates cmake config files for your package
82+
## Declare things to be passed to dependent projects
83+
## INCLUDE_DIRS: uncomment this if you package contains header files
84+
## LIBRARIES: libraries you create in this project that dependent projects also need
85+
## CATKIN_DEPENDS: catkin_packages dependent projects also need
86+
## DEPENDS: system dependencies of this project that dependent projects also need
87+
catkin_package(
88+
# INCLUDE_DIRS include
89+
# LIBRARIES stereo_processing
90+
# CATKIN_DEPENDS roscpp rospy std_msgs
91+
# DEPENDS system_lib
92+
)
93+
94+
###########
95+
## Build ##
96+
###########
97+
98+
## Specify additional locations of header files
99+
## Your package locations should be listed before other locations
100+
# include_directories(include)
101+
include_directories(
102+
${catkin_INCLUDE_DIRS}
103+
${CERES_INCLUDE_DIRS}
104+
)
105+
106+
## Declare a cpp executable
107+
add_executable(dll_node src/dll_node.cpp)
108+
add_executable(grid3d_node src/grid3d_node.cpp)
109+
110+
## Add cmake target dependencies of the executable/library
111+
## as an example, message headers may need to be generated before nodes
112+
add_dependencies(dll_node ${catkin_EXPORTED_TARGETS})
113+
add_dependencies(grid3d_node ${catkin_EXPORTED_TARGETS})
114+
115+
## Specify libraries to link a library or executable target against
116+
target_link_libraries(dll_node
117+
${catkin_LIBRARIES}
118+
${CERES_LIBRARIES}
119+
)
120+
target_link_libraries(grid3d_node
121+
${catkin_LIBRARIES}
122+
)
123+
124+
#############
125+
## Install ##
126+
#############
127+
128+
# all install targets should use catkin DESTINATION variables
129+
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
130+
131+
## Mark executable scripts (Python etc.) for installation
132+
## in contrast to setup.py, you can choose the destination
133+
# install(PROGRAMS
134+
# scripts/my_python_script
135+
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
136+
# )
137+
138+
## Mark executables and/or libraries for installation
139+
# install(TARGETS stereo_processing stereo_processing_node
140+
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
141+
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
142+
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
143+
# )
144+
145+
## Mark cpp header files for installation
146+
# install(DIRECTORY include/${PROJECT_NAME}/
147+
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
148+
# FILES_MATCHING PATTERN "*.h"
149+
# PATTERN ".svn" EXCLUDE
150+
# )
151+
152+
## Mark other files for installation (e.g. launch and bag files, etc.)
153+
# install(FILES
154+
# # myfile1
155+
# # myfile2
156+
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
157+
# )
158+
159+
#############
160+
## Testing ##
161+
#############
162+
163+
## Add gtest based cpp test target and link libraries
164+
# catkin_add_gtest(${PROJECT_NAME}-test test/test_stereo_processing.cpp)
165+
# if(TARGET ${PROJECT_NAME}-test)
166+
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
167+
# endif()
168+
169+
## Add folders to be run by python nosetests
170+
# catkin_add_nosetests(test)

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
1-
# dll
2-
DLL: Direct Lidar Localization
1+
# DLL: Direct Lidar Localization
2+
3+
Robot localization based on direct registration of 3D LIDAR on maps.
4+
5+
## Dependencies
6+
7+
- ceres: Follow in installation instructions for Google Ceres

launch/dll.launch

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
<!--
2+
-->
3+
<launch>
4+
# Bag filename
5+
<arg name="bag_file" />
6+
7+
# Use simulation time for TFs
8+
<param name="use_sim_time" value="true" />
9+
10+
# Bag file
11+
<node name="bag_player" type="play" pkg="rosbag" args="$(arg bag_file) --clock -s 0 -r 1.0 -l" />
12+
13+
# Frames
14+
<include file="$(find nix_launchers)/launch/frames.launch" />
15+
16+
<arg name="base_frame_id" default="base_link"/>
17+
<arg name="odom_frame_id" default="odom"/>
18+
<arg name="global_frame_id" default="map"/>
19+
20+
# marsella_mapping_2019.bag
21+
<arg name="initial_x" default="6.7"/>
22+
<arg name="initial_y" default="14"/>
23+
<arg name="initial_z" default="0"/>
24+
<arg name="initial_a" default="0.18"/>
25+
<arg name="map" default="marsella_5cm_full.bt" />
26+
27+
# 2020-06-25-15-10-43_0.bag
28+
<!--arg name="initial_x" default="6.23"/>
29+
<arg name="initial_y" default="11.9"/>
30+
<arg name="initial_z" default="0"/>
31+
<arg name="initial_a" default="-1.54"/>
32+
<arg name="map" default="basement_2.bt"/-->
33+
34+
# Odom to TF
35+
<!--node pkg="odom_to_tf" type="odom_to_tf.py" name="odom_to_tf">
36+
<param name="laser_frame" value="base_link"/>
37+
<param name="rotate_90" value="false"/>
38+
</node-->
39+
40+
# Launch DLL
41+
<node name="dll_node" type="dll_node" pkg="dll" output="screen">
42+
<remap from="/dll_node/initial_pose" to="/initialpose"/>
43+
<param name="in_cloud" value="/os1_cloud_node/points_non_dense" />
44+
<param name="base_frame_id" value="$(arg base_frame_id)" />
45+
<param name="odom_frame_id" value="$(arg odom_frame_id)" />
46+
<param name="global_frame_id" value="$(arg global_frame_id)" />
47+
48+
<param name="rate" value="10.0" />
49+
<param name="map_path" value="$(find dll)/launch/$(arg map)" />
50+
<param name="sensor_dev" value="0.02" />
51+
<param name="publish_point_cloud" value="true" />
52+
<param name="update_min_d" value="0.1" />
53+
<param name="update_min_a" value="0.1" />
54+
<param name="initial_x" value="$(arg initial_x)"/>
55+
<param name="initial_y" value="$(arg initial_y)"/>
56+
<param name="initial_z" value="$(arg initial_z)"/>
57+
<param name="initial_a" value="$(arg initial_a)"/>
58+
<param name="lidar_width" value="1024" />
59+
<param name="lidar_height" value="16" />
60+
<param name="lidar_fov" value="0.7854" />
61+
<param name="m_lidar_fov_down" value="0.3927" />
62+
<param name="use_imu" value="false" />
63+
64+
</node>
65+
66+
<node name="rviz" type="rviz" pkg="rviz" output="screen"/>
67+
</launch>

package.xml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0"?>
2+
<package>
3+
<name>dll</name>
4+
<version>1.0.0</version>
5+
<description>Direct Lidar Localization (DLL)</description>
6+
7+
<!-- One maintainer tag required, multiple allowed, one person per tag -->
8+
<!-- Example: -->
9+
<!-- <maintainer email="[email protected]">Jane Doe</maintainer> -->
10+
<maintainer email="[email protected]">Fernando Caballero</maintainer>
11+
12+
13+
<!-- One license tag required, multiple allowed, one license per tag -->
14+
<!-- Commonly used license strings: -->
15+
<!-- BSD, MIT, Boost Software License, GPLv2, GPLv3, LGPLv2.1, LGPLv3 -->
16+
<license>TODO</license>
17+
18+
19+
<!-- Url tags are optional, but mutiple are allowed, one per tag -->
20+
<!-- Optional attribute type can be: website, bugtracker, or repository -->
21+
<!-- Example: -->
22+
<!-- <url type="website">http://wiki.ros.org/stereo_processing</url> -->
23+
24+
25+
<!-- Author tags are optional, mutiple are allowed, one per tag -->
26+
<!-- Authors do not have to be maintianers, but could be -->
27+
<!-- Example: -->
28+
<!-- <author email="[email protected]">Jane Doe</author> -->
29+
30+
31+
<!-- The *_depend tags are used to specify dependencies -->
32+
<!-- Dependencies can be catkin packages or system dependencies -->
33+
<!-- Examples: -->
34+
<!-- Use build_depend for packages you need at compile time: -->
35+
<!-- <build_depend>message_generation</build_depend> -->
36+
<!-- Use buildtool_depend for build tool packages: -->
37+
<!-- <buildtool_depend>catkin</buildtool_depend> -->
38+
<!-- Use run_depend for packages you need at runtime: -->
39+
<!-- <run_depend>message_runtime</run_depend> -->
40+
<!-- Use test_depend for packages you need only for testing: -->
41+
<!-- <test_depend>gtest</test_depend> -->
42+
<buildtool_depend>catkin</buildtool_depend>
43+
<build_depend>roscpp</build_depend>
44+
<build_depend>std_msgs</build_depend>
45+
<build_depend>nav_msgs</build_depend>
46+
<build_depend>geometry_msgs</build_depend>
47+
<build_depend>tf</build_depend>
48+
<build_depend>libpcl-all-dev</build_depend>
49+
<build_depend>octomap</build_depend>
50+
<build_depend>octomap_ros</build_depend>
51+
<build_depend>pcl_ros</build_depend>
52+
<run_depend>pcl_ros</run_depend>
53+
<run_depend>octomap</run_depend>
54+
<run_depend>octomap_ros</run_depend>
55+
<run_depend>libpcl-all</run_depend>
56+
<run_depend>roscpp</run_depend>
57+
<run_depend>std_msgs</run_depend>
58+
<run_depend>nav_msgs</run_depend>
59+
<run_depend>tf</run_depend>
60+
61+
62+
63+
<!-- The export tag contains other, unspecified, tags -->
64+
<export>
65+
<!-- Other tools can request additional information be placed here -->
66+
67+
</export>
68+
</package>

src/dll_node.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#include <ros/ros.h>
2+
#include <string>
3+
#include "dllnode.hpp"
4+
5+
int main(int argc, char **argv)
6+
{
7+
ros::init(argc, argv, "dll_node");
8+
9+
// Particle filter instance
10+
std::string node_name = "dll_node";
11+
DLLNode node(node_name);
12+
13+
// Process data at given rate
14+
ros::spin();
15+
16+
return 0;
17+
}
18+
19+
20+
21+

0 commit comments

Comments
 (0)