Skip to content

Commit

Permalink
naoqi-interface.l: enable to pass string as joint-name (but not suppo…
Browse files Browse the repository at this point in the history
…rted onQi side)
  • Loading branch information
k-okada committed Jun 21, 2024
1 parent 25dd087 commit dd50787
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jsk_naoqi_robot/naoqieus/naoqi-interface.l
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,17 @@
(setq joint-name (list "LHand")))
(:rhand
(setq joint-name (list "RHand")))
(t
(setq joint-name joint)
(if (/= (length joint-name) (length stiffness))
(ros::ros-warn "length for 'joint' and 'sitffness' must be same")))
)
(send goal :goal :trajectory :joint_names joint-name)
(send goal :goal :trajectory :header :stamp (ros::time-now))
(send goal :goal :trajectory :points
(list (instance trajectory_msgs::JointTrajectoryPoint
:init
:positions (fill (instantiate float-vector (length joint-name)) stiffness)
:positions (if (numberp stiffness) (fill (instantiate float-vector (length joint-name)) stiffness) stiffness)
:time_from_start (ros::time 1))))
(send joint-stiffness-trajectory-action :send-goal goal)
))
Expand Down

0 comments on commit dd50787

Please sign in to comment.