@@ -110,3 +110,35 @@ is replaced with replacement.
110
110
(if robot-object
111
111
(btr :set-robot-state-from-tf cram-tf :*transformer* robot-object)
112
112
(warn " ROBOT was not defined. Have you loaded a robot package?" ))))
113
+
114
+
115
+
116
+ (defun vary-kitchen-urdf (&optional (new-joint-states
117
+ ; ; '(("sink_area_footprint_joint"
118
+ ; ; ((1.855d0 1.3d0 0.0d0) (0 0 1 0)))
119
+ ; ; ("oven_area_footprint_joint"
120
+ ; ; ((1.855d0 2.47d0 0.0d0) (0 0 1 0)))
121
+ ; ; ("kitchen_island_footprint_joint"
122
+ ; ; ((-1.365d0 0.59d0 0.0d0) (0 0 0 1)))
123
+ ; ; ("fridge_area_footprint_joint"
124
+ ; ; ((1.845d0 -0.73d0 0.0d0) (0 0 1 0)))
125
+ ; ; ("table_area_main_joint"
126
+ ; ; ((-2.4d0 -1.5d0 0.0d0) (0 0 1 0))))
127
+ ' ((" sink_area_footprint_joint"
128
+ ((1.155d0 0.9d0 0.0d0 ) (0 0 0 1 )))
129
+ (" oven_area_footprint_joint"
130
+ ((-0.155d0 2.97d0 0.0d0 ) (0 0 -0.5 0.5 )))
131
+ (" kitchen_island_footprint_joint"
132
+ ((-0.60d0 -0.2d0 0.0d0 ) (0 0 0.5 0.5 )))
133
+ (" fridge_area_footprint_joint"
134
+ ((-2.30d0 0.5d0 0.0d0 ) (0 0 0.5 0.5 )))
135
+ (" table_area_main_joint"
136
+ ((1.6d0 -1.0d0 0.0d0 ) (0 0 0.5 0.5 ))))))
137
+ (let ((kitchen-urdf-joints (cl-urdf :joints *kitchen-urdf* )))
138
+ (mapc (lambda (joint-name-poses-list-pair)
139
+ (destructuring-bind (joint-name poses-list)
140
+ joint-name-poses-list-pair
141
+ (let ((joint (gethash joint-name kitchen-urdf-joints)))
142
+ (setf (slot-value joint ' cl-urdf:origin)
143
+ (cram-tf :list->transform poses-list)))))
144
+ new-joint-states)))
0 commit comments