Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type adaptation PCL #13

Draft
wants to merge 7 commits into
base: rolling
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
make linters happy
Signed-off-by: Alejandro Hernández Cordero <ahcorde@gmail.com>
  • Loading branch information
ahcorde committed Jul 3, 2023
commit 7889237ea5f738c28fb678a29a448cd41bd62290
24 changes: 8 additions & 16 deletions draco_point_cloud_transport/src/draco_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ void DracoPublisher::declareParameters(const std::string & base_topic)
return result;
} else if (parameter.get_name() == "encode_speed") {
int value = parameter.as_int();
if (value >= 0 && value <= 10)
{
if (value >= 0 && value <= 10) {
config_.encode_speed = value;
} else {
RCLCPP_ERROR_STREAM(
Expand All @@ -122,8 +121,7 @@ void DracoPublisher::declareParameters(const std::string & base_topic)
return result;
} else if (parameter.get_name() == "decode_speed") {
int value = parameter.as_int();
if (value >= 0 && value <= 10)
{
if (value >= 0 && value <= 10) {
config_.decode_speed = value;
} else {
RCLCPP_ERROR_STREAM(
Expand All @@ -132,8 +130,7 @@ void DracoPublisher::declareParameters(const std::string & base_topic)
return result;
} else if (parameter.get_name() == "method_enum") {
int value = parameter.as_int();
if (value >= 0 && value <= 2)
{
if (value >= 0 && value <= 2) {
config_.method_enum = value;
} else {
RCLCPP_ERROR_STREAM(
Expand All @@ -149,8 +146,7 @@ void DracoPublisher::declareParameters(const std::string & base_topic)
return result;
} else if (parameter.get_name() == "quantization_POSITION") {
int value = parameter.as_int();
if (value >= 1 && value <= 31)
{
if (value >= 1 && value <= 31) {
config_.quantization_POSITION = value;
} else {
RCLCPP_ERROR_STREAM(
Expand All @@ -159,8 +155,7 @@ void DracoPublisher::declareParameters(const std::string & base_topic)
return result;
} else if (parameter.get_name() == "quantization_NORMAL") {
int value = parameter.as_int();
if (value >= 1 && value <= 31)
{
if (value >= 1 && value <= 31) {
config_.quantization_NORMAL = value;
} else {
RCLCPP_ERROR_STREAM(
Expand All @@ -169,8 +164,7 @@ void DracoPublisher::declareParameters(const std::string & base_topic)
return result;
} else if (parameter.get_name() == "quantization_COLOR") {
int value = parameter.as_int();
if (value >= 1 && value <= 31)
{
if (value >= 1 && value <= 31) {
config_.quantization_COLOR = value;
} else {
RCLCPP_ERROR_STREAM(
Expand All @@ -179,8 +173,7 @@ void DracoPublisher::declareParameters(const std::string & base_topic)
return result;
} else if (parameter.get_name() == "quantization_TEX_COORD") {
int value = parameter.as_int();
if (value >= 1 && value <= 31)
{
if (value >= 1 && value <= 31) {
config_.quantization_TEX_COORD = value;
} else {
RCLCPP_ERROR_STREAM(
Expand All @@ -189,8 +182,7 @@ void DracoPublisher::declareParameters(const std::string & base_topic)
return result;
} else if (parameter.get_name() == "quantization_GENERIC") {
int value = parameter.as_int();
if (value >= 1 && value <= 31)
{
if (value >= 1 && value <= 31) {
config_.quantization_GENERIC = value;
} else {
RCLCPP_ERROR_STREAM(
Expand Down