Skip to content

Commit

Permalink
velodyne_packet_pointcloud: Add new packet structure files
Browse files Browse the repository at this point in the history
  • Loading branch information
judav25 committed Aug 5, 2024
1 parent e68537e commit 7cf4b10
Show file tree
Hide file tree
Showing 8 changed files with 150 additions and 0 deletions.
64 changes: 64 additions & 0 deletions velodyne_packet_pointcloud/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
cmake_minimum_required(VERSION 3.0.2)
project(velodyne_packet_pointcloud)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(${PROJECT_NAME}_CATKIN_DEPS
angles
nodelet
roscpp
roslib
sensor_msgs
tf2_ros
velodyne_driver
velodyne_msgs
ethernet_msgs
dynamic_reconfigure
diagnostic_updater
)

find_package(catkin REQUIRED COMPONENTS
${${PROJECT_NAME}_CATKIN_DEPS}
roslint)

find_package(Boost COMPONENTS signals)
find_package(Eigen3 REQUIRED)
# Resolve system dependency on yaml-cpp, which apparently does not
# provide a CMake find_package() module.
find_package(PkgConfig REQUIRED)
pkg_check_modules(YAML_CPP REQUIRED yaml-cpp)
find_path(YAML_CPP_INCLUDE_DIR
NAMES yaml_cpp.h
PATHS ${YAML_CPP_INCLUDE_DIRS})
find_library(YAML_CPP_LIBRARY
NAMES YAML_CPP
PATHS ${YAML_CPP_LIBRARY_DIRS})

link_directories(${YAML_CPP_LIBRARY_DIRS})

#generate_dynamic_reconfigure_options(
#)

if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5")
add_definitions(-DHAVE_NEW_YAMLCPP)
endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5")

include_directories(include ${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIR}
)

catkin_package(
CATKIN_DEPENDS ${${PROJECT_NAME}_CATKIN_DEPS}
INCLUDE_DIRS include
LIBRARIES velodyne_rawdata data_containers)

add_subdirectory(src)


install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})




8 changes: 8 additions & 0 deletions velodyne_packet_pointcloud/include/unpacker.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
//
// Created by jugo on 05.08.24.
//

#ifndef VELODYNE_POINTCLOUD_UNPACKER_H
#define VELODYNE_POINTCLOUD_UNPACKER_H

#endif //VELODYNE_POINTCLOUD_UNPACKER_H
14 changes: 14 additions & 0 deletions velodyne_packet_pointcloud/nodelets.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<class_libraries>

<library path="lib/libpacketpc_nodelet">
<class name="velodyne_packet_pointcloud/PacketpcNodelet"
type="velodyne_packet_pointcloud::PacketpcNodelet"
base_class_type="nodelet::Nodelet">
<description>
Transforms packets into PointCloud2 and publish them as they arrive.
</description>
</class>
</library>


</class_libraries>
42 changes: 42 additions & 0 deletions velodyne_packet_pointcloud/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<?xml version="1.0"?>
<package format="2">
<name>velodyne_packet_pointcloud</name>
<version>1.6.1</version>
<description>
Packet comvertion to Pointcloud2 for VLS128 Velodyne.
</description>
<maintainer email="[email protected]">Juan D. González</maintainer>
<author>Juan D. González</author>

<license>BSD</license>


<buildtool_depend>catkin</buildtool_depend>

<build_depend>roslint</build_depend>

<depend>angles</depend>
<depend>nodelet</depend>
<depend>roscpp</depend>
<depend>roslib</depend>
<depend>sensor_msgs</depend>
<depend>tf2_ros</depend>
<depend>velodyne_driver</depend>
<depend>velodyne_msgs</depend>
<depend>ethernet_msgs</depend>
<depend>yaml-cpp</depend>
<depend>dynamic_reconfigure</depend>
<depend>diagnostic_updater</depend>
<depend>eigen</depend>

<exec_depend>velodyne_laserscan</exec_depend>

<test_depend>rosunit</test_depend>
<test_depend>roslaunch</test_depend>
<test_depend>rostest</test_depend>
<test_depend>tf2_ros</test_depend>

<export>
<nodelet plugin="${prefix}/nodelets.xml"/>
</export>
</package>
13 changes: 13 additions & 0 deletions velodyne_packet_pointcloud/src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
add_executable(packetpc_node packetpc_node.cpp unpacker.cpp)
target_link_libraries(packetpc_node
${catkin_LIBRARIES}
${YAML_CPP_LIBRARIES}
)
add_dependencies(packetpc_node ${PROJECT_NAME}_gencfg)


add_library(packetpc_nodelet packetpc_nodelet.cpp unpacker.cpp)
target_link_libraries(packetpc_nodelet
${catkin_LIBRARIES}
${YAML_CPP_LIBRARIES})
add_dependencies(packetpc_nodelet ${PROJECT_NAME}_gencfg)
3 changes: 3 additions & 0 deletions velodyne_packet_pointcloud/src/packetpc_node.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//
// Created by jugo on 05.08.24.
//
3 changes: 3 additions & 0 deletions velodyne_packet_pointcloud/src/packetpc_nodelet.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//
// Created by jugo on 05.08.24.
//
3 changes: 3 additions & 0 deletions velodyne_packet_pointcloud/src/unpacker.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//
// Created by jugo on 05.08.24.
//

0 comments on commit 7cf4b10

Please sign in to comment.