Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 1 addition & 4 deletions Dockerfile.estimator
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ FROM base

ARG SERVICE_PACKAGE=ibpc_pose_estimator
ARG SERVICE_EXECUTABLE_NAME=ibpc_pose_estimator
ARG SERVICE_NAME=/get_pose_estimates

RUN apt update \
&& sudo apt install curl -y \
Expand All @@ -72,8 +71,6 @@ RUN sed --in-place \
ENV SERVICE_PACKAGE=${SERVICE_PACKAGE}
ENV SERVICE_EXECUTABLE_NAME=${SERVICE_EXECUTABLE_NAME}
ENV MODEL_DIR=/opt/ros/underlay/install/models
ENV SERVICE_NAME=${SERVICE_NAME}

CMD exec /opt/ros/overlay/install/lib/${SERVICE_PACKAGE}/${SERVICE_EXECUTABLE_NAME} \
--ros-args -p model_dir:=${MODEL_DIR} \
-p service_name:=${SERVICE_NAME}
--ros-args -p model_dir:=${MODEL_DIR}
5 changes: 1 addition & 4 deletions Dockerfile.tester
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ FROM base
ARG DATASET_NAME
ARG SERVICE_PACKAGE=ibpc_tester
ARG SERVICE_EXECUTABLE_NAME=ibpc_tester
ARG SERVICE_NAME=/get_pose_estimates

RUN apt update \
&& sudo apt install curl -y \
Expand All @@ -74,8 +73,6 @@ ENV DATASET_NAME=${DATASET_NAME}
ENV SERVICE_PACKAGE=${SERVICE_PACKAGE}
ENV SERVICE_EXECUTABLE_NAME=${SERVICE_EXECUTABLE_NAME}
ENV BOP_PATH=/opt/ros/underlay/install/datasets
ENV SERVICE_NAME=${SERVICE_NAME}

CMD exec /opt/ros/overlay/install/lib/${SERVICE_PACKAGE}/${SERVICE_EXECUTABLE_NAME} \
--ros-args -p dataset_name:=${DATASET_NAME} \
-p service_name:=${SERVICE_NAME}
--ros-args -p dataset_name:=${DATASET_NAME}
3 changes: 1 addition & 2 deletions ibpc_pose_estimator/src/ibpc_pose_estimator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ PoseEstimator::PoseEstimator(const rclcpp::NodeOptions & options)
);
model_dir_ = std::filesystem::path(std::move(path_str));

std::string srv_name =
this->declare_parameter("service_name", "/get_pose_estimates");
std::string srv_name = "/get_pose_estimates";
RCLCPP_INFO(
this->get_logger(),
"Pose estimates can be queried over srv %s.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,7 @@ def __init__(self):
if self.model_dir == "":
raise Exception("ROS parameter model_dir not set.")
self.get_logger().info(f"Model directory set to {self.model_dir}.")
srv_name = (
self.declare_parameter("service_name", "/get_pose_estimates")
.get_parameter_value()
.string_value
)
if srv_name == "":
raise Exception("ROS parameter service_name not set.")
srv_name = "/get_pose_estimates"
self.get_logger().info(f"Pose estimates can be queried over srv {srv_name}.")
self.srv = self.create_service(GetPoseEstimates, srv_name, self.srv_cb)

Expand Down