2828// POSSIBILITY OF SUCH DAMAGE.
2929// -- END LICENSE BLOCK ------------------------------------------------
3030
31+ #include < ur_client_library/helpers.h>
3132#include < ur_client_library/control/motion_primitives.h>
3233#include < ur_client_library/log.h>
3334
3435namespace urcl ::control
3536{
36- #pragma GCC diagnostic push
37- #pragma GCC diagnostic ignored "-Wdeprecated-declarations"
3837
3938bool MotionPrimitive::validate () const
4039{
@@ -164,13 +163,16 @@ void MoveJPrimitive::setTarget(const MotionTarget& target)
164163 if constexpr (std::is_same_v<T, urcl::Pose>)
165164 {
166165 type = MotionType::MOVEJ_POSE ;
167-
166+ URCL_SILENCE_DEPRECATED_BEGIN
168167 target_joint_configuration.fill (0 );
168+ URCL_SILENCE_DEPRECATED_END
169169 }
170170 else if constexpr (std::is_same_v<T, Q>)
171171 {
172172 type = MotionType::MOVEJ ;
173+ URCL_SILENCE_DEPRECATED_BEGIN
173174 std::copy (target_variant.values .begin (), target_variant.values .end (), target_joint_configuration.begin ());
175+ URCL_SILENCE_DEPRECATED_END
174176 }
175177 },
176178 target);
@@ -205,12 +207,16 @@ void MoveLPrimitive::setTarget(const MotionTarget& target)
205207 if constexpr (std::is_same_v<T, urcl::Pose>)
206208 {
207209 type = MotionType::MOVEL ;
210+ URCL_SILENCE_DEPRECATED_BEGIN
208211 target_pose = target_variant;
212+ URCL_SILENCE_DEPRECATED_END
209213 }
210214 else if constexpr (std::is_same_v<T, Q>)
211215 {
212216 type = MotionType::MOVEL_JOINT ;
217+ URCL_SILENCE_DEPRECATED_BEGIN
213218 target_pose = urcl::Pose{};
219+ URCL_SILENCE_DEPRECATED_END
214220 }
215221 },
216222 target);
@@ -243,12 +249,16 @@ void MovePPrimitive::setTarget(const MotionTarget& target)
243249 if constexpr (std::is_same_v<T, urcl::Pose>)
244250 {
245251 type = MotionType::MOVEP ;
252+ URCL_SILENCE_DEPRECATED_BEGIN
246253 target_pose = target_variant;
254+ URCL_SILENCE_DEPRECATED_END
247255 }
248256 else if constexpr (std::is_same_v<T, Q>)
249257 {
250258 type = MotionType::MOVEP_JOINT ;
259+ URCL_SILENCE_DEPRECATED_BEGIN
251260 target_pose = urcl::Pose{};
261+ URCL_SILENCE_DEPRECATED_END
252262 }
253263 },
254264 target);
@@ -328,11 +338,15 @@ void MoveCPrimitive::refreshLegacyFields()
328338 using T = std::decay_t <decltype (target_variant)>;
329339 if constexpr (std::is_same_v<T, urcl::Pose>)
330340 {
341+ URCL_SILENCE_DEPRECATED_BEGIN
331342 target_pose = target_variant;
343+ URCL_SILENCE_DEPRECATED_END
332344 }
333345 else if constexpr (std::is_same_v<T, Q>)
334346 {
347+ URCL_SILENCE_DEPRECATED_BEGIN
335348 target_pose = urcl::Pose{};
349+ URCL_SILENCE_DEPRECATED_END
336350 }
337351 },
338352 *target_);
@@ -344,11 +358,15 @@ void MoveCPrimitive::refreshLegacyFields()
344358 using T = std::decay_t <decltype (via_variant)>;
345359 if constexpr (std::is_same_v<T, urcl::Pose>)
346360 {
361+ URCL_SILENCE_DEPRECATED_BEGIN
347362 via_point_pose = via_variant;
363+ URCL_SILENCE_DEPRECATED_END
348364 }
349365 else if constexpr (std::is_same_v<T, Q>)
350366 {
367+ URCL_SILENCE_DEPRECATED_BEGIN
351368 via_point_pose = urcl::Pose{};
369+ URCL_SILENCE_DEPRECATED_END
352370 }
353371 },
354372 via_point_);
@@ -378,12 +396,16 @@ void OptimoveJPrimitive::setTarget(const MotionTarget& target)
378396 if constexpr (std::is_same_v<T, urcl::Pose>)
379397 {
380398 type = MotionType::OPTIMOVEJ_POSE ;
399+ URCL_SILENCE_DEPRECATED_BEGIN
381400 target_joint_configuration.fill (0 );
401+ URCL_SILENCE_DEPRECATED_END
382402 }
383403 else if constexpr (std::is_same_v<T, Q>)
384404 {
385405 type = MotionType::OPTIMOVEJ ;
406+ URCL_SILENCE_DEPRECATED_BEGIN
386407 std::copy (target_variant.values .begin (), target_variant.values .end (), target_joint_configuration.begin ());
408+ URCL_SILENCE_DEPRECATED_END
387409 }
388410 },
389411 target);
@@ -416,16 +438,19 @@ void OptimoveLPrimitive::setTarget(const MotionTarget& target)
416438 if constexpr (std::is_same_v<T, urcl::Pose>)
417439 {
418440 type = MotionType::OPTIMOVEL ;
441+ URCL_SILENCE_DEPRECATED_BEGIN
419442 target_pose = target_variant;
443+ URCL_SILENCE_DEPRECATED_END
420444 }
421445 else if constexpr (std::is_same_v<T, Q>)
422446 {
423447 type = MotionType::OPTIMOVEL_JOINT ;
448+ URCL_SILENCE_DEPRECATED_BEGIN
424449 target_pose = urcl::Pose{};
450+ URCL_SILENCE_DEPRECATED_END
425451 }
426452 },
427453 target);
428454}
429- #pragma GCC diagnostic pop
430455
431456} // namespace urcl::control
0 commit comments