11/* ******************************************************************************
2- * Copyright (c) 2023 Orbbec 3D Technology, Inc
3- *
4- * Licensed under the Apache License, Version 2.0 (the "License");
5- * you may not use this file except in compliance with the License.
6- * You may obtain a copy of the License at
7- *
8- * http://www.apache.org/licenses/LICENSE-2.0
9- *
10- * Unless required by applicable law or agreed to in writing, software
11- * distributed under the License is distributed on an "AS IS" BASIS,
12- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13- * See the License for the specific language governing permissions and
14- * limitations under the License.
15- *******************************************************************************/
2+ * Copyright (c) 2023 Orbbec 3D Technology, Inc
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ *******************************************************************************/
1616
1717#include " orbbec_camera/ros_param_backend.h"
1818namespace orbbec_camera {
@@ -26,10 +26,16 @@ ParametersBackend::~ParametersBackend() {
2626 ros_callback_.reset ();
2727 }
2828}
29-
29+ #if defined(ROS_JAZZY)
30+ void ParametersBackend::addOnSetParametersCallback (
31+ rclcpp::node_interfaces::NodeParametersInterface::OnSetParametersCallbackType callback) {
32+ ros_callback_ = node_->add_on_set_parameters_callback (callback);
33+ }
34+ #else
3035void ParametersBackend::addOnSetParametersCallback (
3136 rclcpp::node_interfaces::NodeParametersInterface::OnParametersSetCallbackType callback) {
3237 ros_callback_ = node_->add_on_set_parameters_callback (callback);
3338}
39+ #endif
3440
3541} // namespace orbbec_camera
0 commit comments