diff --git a/.github/workflows/ros-ci.yml b/.github/workflows/ros-ci.yml
new file mode 100644
index 0000000..bb5ced9
--- /dev/null
+++ b/.github/workflows/ros-ci.yml
@@ -0,0 +1,57 @@
+name: ros2-devel
+
+# Controls when the action will run. Triggers the workflow on push or pull request
+on:
+ push:
+ branches: [ ros2-devel ]
+ pull_request:
+ branches: [ ros2-devel ]
+
+# A workflow run is made up of one or more jobs that can run sequentially or in parallel
+jobs:
+ ros2-devel-ci:
+ runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ ros_distribution:
+ # - dashing
+ # - foxy
+ # - galactic
+ - rolling
+ include:
+ # Dashing Diademata (May 2019 - May 2021)
+ # - docker_image: ubuntu:bionic
+ # ros_distribution: dashing
+ # ros_version: 2
+ # Foxy Fitzroy (June 2020 - May 2023)
+ # - docker_image: ubuntu:focal
+ # ros_distribution: foxy
+ # ros_version: 2
+ # Galactic Geochelone (May 2021)
+ # - docker_image: ubuntu:focal
+ # ros_distribution: galactic
+ # ros_version: 2
+ # Rolling
+ - docker_image: ubuntu:focal
+ ros_distribution: rolling
+ ros_version: 2
+ container:
+ image: ${{ matrix.docker_image }}
+ steps:
+ - name: Setup directories
+ run: mkdir -p ros_ws/src
+ - name: checkout
+ uses: actions/checkout@v2
+ with:
+ path: ros_ws/src
+ - name: Setup ROS environment
+ uses: ros-tooling/setup-ros@0.1.2
+ with:
+ required-ros-distributions: ${{ matrix.ros_distribution }}
+ - name: Build and Test
+ uses: ros-tooling/action-ros-ci@v0.2
+ with:
+ package-name: turtlebot3
+ target-ros2-distro: ${{ matrix.ros_distribution }}
+ vcs-repo-file-url: ""
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 1e5a387..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,29 +0,0 @@
-services:
- - docker
-
-language:
- - generic
-
-notifications:
- email:
- on_success: change
- on_failure: always
- recipients:
- - willson@robotis.com
-
-branches:
- only:
- - ros2
- - ros2-devel
- - dashing-devel
- - eloquent-devel
- - foxy-devel
-
-install:
- - git clone --quiet --depth 1 https://github.com/ROBOTIS-GIT/ros2ci.git .ros2ci
-
-matrix:
- include:
- - script: .ros2ci/travis.bash dashing
- - script: .ros2ci/travis.bash eloquent
- - script: .ros2ci/travis.bash nightly
diff --git a/CHANGELOG.rst b/CHANGELOG.rst
index acb1c74..5f7a1a9 100644
--- a/CHANGELOG.rst
+++ b/CHANGELOG.rst
@@ -2,6 +2,12 @@
Changelog for package hls_lfcd_lds_driver
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+2.0.2 (2021-04-15)
+------------------
+* fix laserscan bug
+* rename nav2 params
+* Contributors: Will Son
+
2.0.1 (2020-07-13)
------------------
* ROS 2 Eloquent Elusor supported
diff --git a/README.md b/README.md
index 1b1bb7e..0815865 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,15 @@
# HLDS HLS-LFCD-LDS (LDS-01)
-## ROS 1 Packages for LDS-01 Driver
-|develop|master|Kinetic + Ubuntu Xenial|Melodic + Ubuntu Bionic|Noetic + Ubuntu Focal|
-|:---:|:---:|:---:|:---:|:---:|
-|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver.svg?branch=develop)](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver.svg?branch=master)](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver.svg?branch=kinetic-devel)](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver.svg?branch=melodic-devel)](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver.svg?branch=noetic-devel)](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver)|
-## ROS 2 Packages for LDS-01 Driver
-|ros2-devel|ros2|Dashing + Ubuntu Bionic|Eloquent + Ubuntu Bionic|Foxy + Ubuntu Foxy|
-|:---:|:---:|:---:|:---:|:---:|
-|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver.svg?branch=ros2-devel)](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver.svg?branch=ros2)](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver.svg?branch=dashing-devel)](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver.svg?branch=eloquent-devel)](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver.svg?branch=foxy-devel)](https://travis-ci.org/ROBOTIS-GIT/hls_lfcd_lds_driver)|
+[![kinetic-devel Status](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/workflows/kinetic-devel/badge.svg)](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/tree/kinetic-devel)
+
+[![melodic-devel Status](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/workflows/melodic-devel/badge.svg)](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/tree/melodic-devel)
+
+[![noetic-devel Status](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/workflows/noetic-devel/badge.svg)](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/tree/noetic-devel)
+
+[![dashing-devel Status](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/workflows/dashing-devel/badge.svg)](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/tree/dashing-devel)
+
+[![foxy-devel Status](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/workflows/foxy-devel/badge.svg)](https://github.com/ROBOTIS-GIT/hls_lfcd_lds_driver/tree/foxy-devel)
## ROBOTIS e-Manual for TurtleBot3 and LDS-01
- [ROBOTIS e-Manual for TurtleBot3 and LDS-01](http://turtlebot3.robotis.com/)
diff --git a/launch/hlds_laser.launch.py b/launch/hlds_laser.launch.py
index d9f97c7..aa38b93 100644
--- a/launch/hlds_laser.launch.py
+++ b/launch/hlds_laser.launch.py
@@ -45,8 +45,8 @@ def generate_launch_description():
Node(
package='hls_lfcd_lds_driver',
- node_executable='hlds_laser_publisher',
- node_name='hlds_laser_publisher',
+ executable='hlds_laser_publisher',
+ name='hlds_laser_publisher',
parameters=[{'port': port, 'frame_id': frame_id}],
output='screen'),
])
diff --git a/launch/view_hlds_laser.launch.py b/launch/view_hlds_laser.launch.py
index 9a49b26..85f14fb 100644
--- a/launch/view_hlds_laser.launch.py
+++ b/launch/view_hlds_laser.launch.py
@@ -32,8 +32,8 @@ def generate_launch_description():
return LaunchDescription([
Node(
package='rviz2',
- node_executable='rviz2',
- node_name='rviz2',
+ executable='rviz2',
+ name='rviz2',
arguments=['-d', rviz_config_dir],
output='screen'),
])
diff --git a/package.xml b/package.xml
index 8ea656f..3f06501 100644
--- a/package.xml
+++ b/package.xml
@@ -2,7 +2,7 @@
hls_lfcd_lds_driver
- 2.0.1
+ 2.0.2
ROS package for LDS(HLS-LFCD2).
The LDS (Laser Distance Sensor) is a sensor sending the data to Host for the simultaneous localization and mapping (SLAM). Simultaneously the detecting obstacle data can also be sent to Host. HLDS(Hitachi-LG Data Storage) is developing the technology for the moving platform sensor such as Robot Vacuum Cleaners, Home Robot, Robotics Lawn Mower Sensor, etc.
diff --git a/src/hlds_laser_publisher.cpp b/src/hlds_laser_publisher.cpp
index 0c83f96..a5970ff 100644
--- a/src/hlds_laser_publisher.cpp
+++ b/src/hlds_laser_publisher.cpp
@@ -100,7 +100,6 @@ void LFCDLaser::poll(sensor_msgs::msg::LaserScan::SharedPtr scan)
{
good_sets++;
motor_speed += (raw_bytes[i+3] << 8) + raw_bytes[i+2]; //accumulate count for avg. time increment
- rpms=(raw_bytes[i+3]<<8|raw_bytes[i+2])/10;
for(uint16_t j = i+4; j < i+40; j=j+6)
{
@@ -121,7 +120,9 @@ void LFCDLaser::poll(sensor_msgs::msg::LaserScan::SharedPtr scan)
}
}
- scan->time_increment = motor_speed/good_sets/1e8;
+ rpms=motor_speed / good_sets / 10;
+ scan->time_increment = (float)(1.0 / (rpms*6));
+ scan->scan_time = scan->time_increment * 360;
}
else
{
@@ -172,7 +173,7 @@ int main(int argc, char **argv)
return 0;
}
- catch (boost::system::system_error ex)
+ catch (boost::system::system_error& ex)
{
//ROS_ERROR("An exception was thrown: %s", ex.what());
return -1;