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

Fix deprecation warning in paramater declaration #1280

Merged
merged 3 commits into from
Sep 11, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def __init__(self):
# Read all positions from parameters
self.goals = []
for name in goal_names:
self.declare_parameter(name)
self.declare_parameter(name, rclpy.Parameter.Type.DOUBLE_ARRAY)
goal = self.get_parameter(name).value
if goal is None or len(goal) == 0:
raise Exception(f'Values for goal "{name}" not set!')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
import rclpy
from rclpy.node import Node
from builtin_interfaces.msg import Duration
from rcl_interfaces.msg import ParameterDescriptor

from trajectory_msgs.msg import JointTrajectory, JointTrajectoryPoint
from sensor_msgs.msg import JointState
Expand Down Expand Up @@ -67,8 +66,7 @@ def __init__(self):
# Read all positions from parameters
self.goals = [] # List of JointTrajectoryPoint
for name in goal_names:
self.declare_parameter(name, descriptor=ParameterDescriptor(dynamic_typing=True))

self.declare_parameter(name, rclpy.Parameter.Type.DOUBLE_ARRAY)
point = JointTrajectoryPoint()

def get_sub_param(sub_param):
Expand Down
Loading