Skip to content

Commit 31a4348

Browse files
committed
Fixed formatting issues and dependencies
1 parent 2b91988 commit 31a4348

File tree

8 files changed

+29
-35
lines changed

8 files changed

+29
-35
lines changed

.github/workflows/ROS2CI.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,4 @@ jobs:
2121
target-ros2-distro: humble
2222
package-name: lms1xx
2323
import-token: ${{ secrets.GITHUB_TOKEN }}
24-
vcs-repo-file-url: depends.repos
2524
skip-tests: true

depends.repos

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

include/LMS1xx/LMS1xx.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,15 @@
2424
#ifndef LMS1XX_H_
2525
#define LMS1XX_H_
2626

27-
#include <LMS1xx/lms_buffer.h>
28-
#include <LMS1xx/lms_structs.h>
29-
#include <rclcpp/logging.hpp>
27+
#include "LMS1xx/lms_buffer.h"
28+
#include "LMS1xx/lms_structs.h"
3029

3130
#include <string>
3231
#include <stdint.h>
3332

33+
#include "rclcpp/logging.hpp"
34+
35+
3436
typedef enum
3537
{
3638
undefined = 0,

include/LMS1xx/LMS1xx_node.hpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
#pragma once
22

3-
#include <LMS1xx/LMS1xx.h>
4-
#include <tf2/exceptions.h>
5-
#include <tf2_ros/buffer.h>
6-
#include <tf2_ros/transform_listener.h>
3+
#include "LMS1xx/LMS1xx.h"
4+
75
#include <chrono>
86
#include <memory>
97
#include <string>
@@ -14,6 +12,9 @@
1412
#include "sensor_msgs/msg/laser_scan.hpp"
1513
#include "sensor_msgs/msg/point_cloud2.hpp"
1614
#include "std_msgs/msg/header.hpp"
15+
#include "tf2/exceptions.h"
16+
#include "tf2_ros/buffer.h"
17+
#include "tf2_ros/transform_listener.h"
1718

1819

1920
namespace LMS1xx_node

include/LMS1xx/lms_buffer.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@
2727
#include <stdint.h>
2828
#include <string.h>
2929
#include <unistd.h>
30-
#include <cstdint>
31-
#include <cstdio>
30+
3231

3332
#define LMS_BUFFER_SIZE 50000
3433
#define LMS_STX 0x02

package.xml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<?xml version="1.0"?>
22
<package format="3">
33
<name>lms1xx</name>
4-
<version>0.0.1</version>
5-
<description>The lms1xx package contains a basic ROS2 driver for the SICK LMS1xx line of LIDARs.</description>
4+
<version>0.3.0</version>
5+
<description>The lms1xx package contains a basic ROS 2 driver for the SICK LMS1xx line of LIDARs.</description>
66

77
<author>Konrad Banachowicz</author>
88
<author email="mpurvis@clearpathrobotics.com">Mike Purvis</author>
99
<author email="shravansomashekara.rai@gmail.com">Shravan S Rai</author>
1010
<author email="samuel@dynorobotics.se">Samuel Lindgren</author>
1111

12-
<maintainer email="shravansomashekara.rai@gmail.com">Shravan S Rai</maintainer>
12+
<maintainer email="tbaltovski@clearpathrobotics.com">Tony Baltovski</maintainer>
1313
<url type="website">http://ros.org/wiki/LMS1xx</url>
1414

1515
<license>LGPL</license>
@@ -19,13 +19,10 @@
1919
<depend>laser_geometry</depend>
2020
<depend>rclcpp</depend>
2121
<depend>sensor_msgs</depend>
22-
<depend>std_msgs</depend>
23-
<depend>tf2_geometry_msgs</depend>
24-
<depend>urdf</depend>
25-
<depend>xacro</depend>
2622
<depend>tf2</depend>
2723
<depend>tf2_ros</depend>
2824

25+
2926
<test_depend>ament_lint_auto</test_depend>
3027
<test_depend>ament_lint_common</test_depend>
3128

src/LMS1xx.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,20 @@
2121
* *
2222
***************************************************************************/
2323

24-
#include <sys/time.h>
25-
#include <sys/types.h>
26-
#include <sys/socket.h>
27-
#include <netinet/in.h>
24+
#include "LMS1xx/LMS1xx.h"
25+
2826
#include <arpa/inet.h>
2927
#include <cstdio>
3028
#include <cstdlib>
3129
#include <cstring>
3230
#include <errno.h>
3331
#include <fcntl.h>
32+
#include <netinet/in.h>
33+
#include <sys/socket.h>
34+
#include <sys/time.h>
35+
#include <sys/types.h>
3436
#include <unistd.h>
3537

36-
#include "LMS1xx/LMS1xx.h"
37-
3838

3939
LMS1xx::LMS1xx() : connected_(false), logger_(rclcpp::get_logger("lms1xx"))
4040
{

src/LMS1xx_node.cpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,15 @@
2222
* *
2323
***************************************************************************/
2424

25+
#include "LMS1xx/LMS1xx.h"
26+
#include "LMS1xx/LMS1xx_node.hpp"
27+
28+
#include <chrono>
2529
#include <csignal>
2630
#include <cstdio>
2731
#include <limits>
28-
#include <string>
29-
#include <chrono>
3032
#include <memory>
31-
#include "LMS1xx/LMS1xx.h"
32-
#include "LMS1xx/LMS1xx_node.hpp"
33+
#include <string>
3334

3435
#define DEG2RAD M_PI/180.0
3536

@@ -99,11 +100,11 @@ void LMS1xx_node::construct_scan()
99100
scan_msg_.range_max = 20.0;
100101
scan_msg_.scan_time = 100.0 / cfg_.scanningFrequency;
101102
scan_msg_.angle_increment =
102-
(double)outputRange_.angleResolution / 10000.0 * DEG2RAD;
103+
static_cast<double>(outputRange_.angleResolution) / 10000.0 * DEG2RAD;
103104

104105
scan_msg_.angle_min =
105-
((double)cfg_.startAngle / 10000.0) * DEG2RAD - M_PI / 2;
106-
scan_msg_.angle_max = (((double)cfg_.stopAngle) / 10000.0) * DEG2RAD - M_PI / 2;
106+
(static_cast<double>(cfg_.startAngle) / 10000.0) * DEG2RAD - M_PI / 2;
107+
scan_msg_.angle_max = ((static_cast<double>(cfg_.stopAngle)) / 10000.0) * DEG2RAD - M_PI / 2;
107108

108109
int angle_range = outputRange_.stopAngle - outputRange_.startAngle;
109110
int num_values = angle_range/ outputRange_.angleResolution;

0 commit comments

Comments
 (0)