Skip to content

Commit

Permalink
SW-5607: rename package ouster_msgs to avoid package name conflict in…
Browse files Browse the repository at this point in the history
… ros index (ouster-lidar#244)

* rename package ouster_msgs to avoid conflict name conflict in ros index
* set ouster_sensor_msgs version number to match with ouster_ros package
  • Loading branch information
Samahu authored and AchmadFathoni committed Feb 16, 2024
1 parent a52940f commit 6d0561f
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 27 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Changelog
is used.
* fix: destagger columns timestamp when generating destaggered point clouds.
* shutdown the driver when unable to connect to the sensor on startup
* breaking: rename ouster_msgs to ouster_sensor_msgs


ouster_ros v0.10.0
Expand Down
4 changes: 2 additions & 2 deletions ouster-ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ find_package(rclcpp_lifecycle REQUIRED)
find_package(std_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(ouster_msgs REQUIRED)
find_package(ouster_sensor_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(Eigen3 REQUIRED)
Expand Down Expand Up @@ -63,7 +63,7 @@ set(ouster_ros_library_deps
rclcpp
sensor_msgs
geometry_msgs
ouster_msgs
ouster_sensor_msgs
pcl_conversions
tf2
tf2_eigen
Expand Down
4 changes: 2 additions & 2 deletions ouster-ros/include/ouster_ros/os_ros.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#include <chrono>
#include <string>

#include "ouster_msgs/msg/packet_msg.hpp"
#include "ouster_sensor_msgs/msg/packet_msg.hpp"
#include "ouster_ros/os_point.h"

namespace ouster_ros {
Expand Down Expand Up @@ -85,7 +85,7 @@ sensor_msgs::msg::Imu packet_to_imu_msg(const ouster::sensor::packet_format& pf,
* @param[in] pf the packet format
* @return ROS sensor message with fields populated from the packet
*/
sensor_msgs::msg::Imu packet_to_imu_msg(const ouster_msgs::msg::PacketMsg& pm,
sensor_msgs::msg::Imu packet_to_imu_msg(const ouster_sensor_msgs::msg::PacketMsg& pm,
const rclcpp::Time& timestamp,
const std::string& frame,
const sensor::packet_format& pf);
Expand Down
4 changes: 2 additions & 2 deletions ouster-ros/include/ouster_ros/os_sensor_node_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <rclcpp_lifecycle/lifecycle_node.hpp>
#include <std_msgs/msg/string.hpp>

#include "ouster_msgs/srv/get_metadata.hpp"
#include "ouster_sensor_msgs/srv/get_metadata.hpp"

namespace ouster_ros {

Expand Down Expand Up @@ -43,7 +43,7 @@ class OusterSensorNodeBase : public rclcpp_lifecycle::LifecycleNode {

protected:
ouster::sensor::sensor_info info;
rclcpp::Service<ouster_msgs::srv::GetMetadata>::SharedPtr get_metadata_srv;
rclcpp::Service<ouster_sensor_msgs::srv::GetMetadata>::SharedPtr get_metadata_srv;
std::string cached_metadata;
rclcpp::Publisher<std_msgs::msg::String>::SharedPtr metadata_pub;
};
Expand Down
4 changes: 2 additions & 2 deletions ouster-ros/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format2.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ouster_ros</name>
<version>0.10.3</version>
<version>0.11.0</version>
<description>Ouster ROS2 driver</description>
<maintainer email="oss@ouster.io">ouster developers</maintainer>
<license file="LICENSE">BSD</license>
Expand All @@ -14,7 +14,7 @@
<depend>rclcpp_components</depend>
<depend>rclcpp_lifecycle</depend>
<depend>std_msgs</depend>
<depend>ouster_msgs</depend>
<depend>ouster_sensor_msgs</depend>
<depend>sensor_msgs</depend>
<depend>geometry_msgs</depend>
<depend>tf2_ros</depend>
Expand Down
4 changes: 2 additions & 2 deletions ouster-ros/src/os_cloud_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include <memory>
#include <cassert>

#include "ouster_msgs/msg/packet_msg.hpp"
#include "ouster_sensor_msgs/msg/packet_msg.hpp"
#include "ouster_ros/os_processing_node_base.h"
#include "ouster_ros/visibility_control.h"

Expand All @@ -31,7 +31,7 @@
#include "laser_scan_processor.h"

namespace sensor = ouster::sensor;
using ouster_msgs::msg::PacketMsg;
using ouster_sensor_msgs::msg::PacketMsg;

namespace ouster_ros {

Expand Down
2 changes: 1 addition & 1 deletion ouster-ros/src/os_ros.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include <vector>

namespace sensor = ouster::sensor;
using ouster_msgs::msg::PacketMsg;
using ouster_sensor_msgs::msg::PacketMsg;

namespace ouster_ros {

Expand Down
6 changes: 3 additions & 3 deletions ouster-ros/src/os_sensor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@

#include "os_sensor_node.h"

using ouster_msgs::msg::PacketMsg;
using ouster_msgs::srv::GetConfig;
using ouster_msgs::srv::SetConfig;
using ouster_sensor_msgs::msg::PacketMsg;
using ouster_sensor_msgs::srv::GetConfig;
using ouster_sensor_msgs::srv::SetConfig;

using namespace std::chrono_literals;
using namespace std::string_literals;
Expand Down
18 changes: 9 additions & 9 deletions ouster-ros/src/os_sensor_node.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include <std_srvs/srv/empty.hpp>
#include <lifecycle_msgs/msg/transition.hpp>
#include <lifecycle_msgs/srv/change_state.hpp>
#include "ouster_msgs/msg/packet_msg.hpp"
#include "ouster_msgs/srv/get_config.hpp"
#include "ouster_msgs/srv/set_config.hpp"
#include "ouster_sensor_msgs/msg/packet_msg.hpp"
#include "ouster_sensor_msgs/srv/get_config.hpp"
#include "ouster_sensor_msgs/srv/set_config.hpp"
#include "ouster_ros/visibility_control.h"
#include "ouster_ros/os_sensor_node_base.h"

Expand Down Expand Up @@ -145,13 +145,13 @@ class OusterSensor : public OusterSensorNodeBase {
std::string mtp_dest;
bool mtp_main;
std::shared_ptr<sensor::client> sensor_client;
ouster_msgs::msg::PacketMsg lidar_packet;
ouster_msgs::msg::PacketMsg imu_packet;
rclcpp::Publisher<ouster_msgs::msg::PacketMsg>::SharedPtr lidar_packet_pub;
rclcpp::Publisher<ouster_msgs::msg::PacketMsg>::SharedPtr imu_packet_pub;
ouster_sensor_msgs::msg::PacketMsg lidar_packet;
ouster_sensor_msgs::msg::PacketMsg imu_packet;
rclcpp::Publisher<ouster_sensor_msgs::msg::PacketMsg>::SharedPtr lidar_packet_pub;
rclcpp::Publisher<ouster_sensor_msgs::msg::PacketMsg>::SharedPtr imu_packet_pub;
rclcpp::Service<std_srvs::srv::Empty>::SharedPtr reset_srv;
rclcpp::Service<ouster_msgs::srv::GetConfig>::SharedPtr get_config_srv;
rclcpp::Service<ouster_msgs::srv::SetConfig>::SharedPtr set_config_srv;
rclcpp::Service<ouster_sensor_msgs::srv::GetConfig>::SharedPtr get_config_srv;
rclcpp::Service<ouster_sensor_msgs::srv::SetConfig>::SharedPtr set_config_srv;
std::shared_ptr<rclcpp::Client<ChangeState>> change_state_client;

// TODO: implement & utilize a lock-free ring buffer in future
Expand Down
2 changes: 1 addition & 1 deletion ouster-ros/src/os_sensor_node_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <fstream>

namespace sensor = ouster::sensor;
using ouster_msgs::srv::GetMetadata;
using ouster_sensor_msgs::srv::GetMetadata;
using sensor::UDPProfileLidar;

namespace ouster_ros {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.5)

project(ouster_msgs)
project(ouster_sensor_msgs)

find_package(ament_cmake REQUIRED)
find_package(std_msgs REQUIRED)
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions ouster-msgs/package.xml → ouster-sensor-msgs/package.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>ouster_msgs</name>
<version>0.2.0</version>
<name>ouster_sensor_msgs</name>
<version>0.11.0</version>
<description>ouster_ros message and service definitions</description>
<maintainer email="oss@ouster.io">ouster developers</maintainer>
<license>BSD</license>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6d0561f

Please sign in to comment.