Skip to content

Commit 36d0554

Browse files
committed
fix CMakeLists.txt to expose LMS1xx driver
2 parents 42868c4 + ee19a3c commit 36d0554

File tree

4 files changed

+12
-145
lines changed

4 files changed

+12
-145
lines changed

CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@ include_directories(include ${console_bridge_INCLUDE_DIRS})
77
add_library(LMS1xx src/LMS1xx.cpp)
88
target_link_libraries(LMS1xx ${console_bridge_LIBRARIES})
99

10+
1011
# Regular catkin package follows.
1112
find_package(catkin REQUIRED COMPONENTS roscpp sensor_msgs)
12-
catkin_package(CATKIN_DEPENDS roscpp)
13+
catkin_package(
14+
INCLUDE_DIRS include
15+
LIBRARIES LMS1xx
16+
CATKIN_DEPENDS roscpp
17+
)
1318

1419
include_directories(include ${catkin_INCLUDE_DIRS})
20+
1521
add_executable(LMS1xx_node src/LMS1xx_node.cpp)
1622
target_link_libraries(LMS1xx_node LMS1xx ${catkin_LIBRARIES})
1723

18-
add_executable(LMS1xx_configuration src/LMS1xx_configuration.cpp)
19-
target_link_libraries(LMS1xx_configuration LMS1xx ${catkin_LIBRARIES})
20-
21-
install(TARGETS LMS1xx LMS1xx_node LMS1xx_configuration
24+
install(TARGETS LMS1xx LMS1xx_node
2225
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
2326
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
2427
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}

launch/LMS1xx_configuration.launch

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/LMS1xx_configuration.cpp

Lines changed: 0 additions & 113 deletions
This file was deleted.

src/LMS1xx_node.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,10 @@ int main(int argc, char **argv)
4747

4848
//check if laser is fully initialized, else reconnect
4949
//assuming fully initialized => scaningFrequency=5000
50-
//if (cfg.scaningFrequency != 5000) {
51-
//laser.disconnect();
52-
//ROS_INFO("Waiting for laser to initialize...");
53-
//}
50+
if (cfg.scaningFrequency != 5000) {
51+
laser.disconnect();
52+
ROS_INFO("Waiting for laser to initialize...");
53+
}
5454

5555
} while (!laser.isConnected());
5656

0 commit comments

Comments
 (0)