@@ -61,14 +61,14 @@ void custom_interface(vsg::CommandBuffer &cb, curan::robotic::RobotLBR &client)
6161 // buffers[index].AddPoint(t, (float)state.user_defined2[index]);
6262 // ImPlot::PlotLine(loc.data(), &buffers[index].Data[0].x, &buffers[index].Data[0].y, buffers[index].Data.size(), 0, buffers[index].Offset, 2 * sizeof(float));
6363
64- loc = " cmdtau_ " + std::to_string (index);
64+ loc = " dq_ " + std::to_string (index);
6565 if (!stop_time)
66- deriv[index].AddPoint (t, (float )state.cmd_tau [index]);
66+ deriv[index].AddPoint (t, (float )state.user_defined2 [index]);
6767 ImPlot::PlotLine (loc.data (), &deriv[index].Data [0 ].x , &deriv[index].Data [0 ].y , deriv[index].Data .size (), 0 , deriv[index].Offset , 2 * sizeof (float ));
6868
69- loc = " accel_ " + std::to_string (index);
69+ loc = " fdq_ " + std::to_string (index);
7070 if (!stop_time)
71- buffers_tau[index].AddPoint (t, (float )state.ddq [index]);
71+ buffers_tau[index].AddPoint (t, (float )state.user_defined3 [index]);
7272 ImPlot::PlotLine (loc.data (), &buffers_tau[index].Data [0 ].x , &buffers_tau[index].Data [0 ].y , buffers_tau[index].Data .size (), 0 , buffers_tau[index].Offset , 2 * sizeof (float ));
7373
7474
@@ -114,7 +114,7 @@ struct ViewFiltering : public curan::robotic::UserData
114114
115115 bool is_first_loop = true ;
116116
117- ViewFiltering () : filtering_mechanism{500 ,200 }
117+ ViewFiltering () : filtering_mechanism{500 ,20 }
118118 {
119119 for (size_t filter_index = 0 ; filter_index < curan::robotic::number_of_joints; ++filter_index)
120120 {
@@ -218,7 +218,7 @@ struct ViewFiltering : public curan::robotic::UserData
218218 }
219219
220220 static vector_type prev_filtered_torque = raw_filtered_torque;
221- const auto & deriv_filtered_torque = filtering_mechanism.update (raw_deriv_filtered_torque ,iiwa.sample_time ());
221+ const auto & joint_vels = filtering_mechanism.update (iiwa. velocities () ,iiwa.sample_time ());
222222
223223 vector_type reference = init_q;
224224 vector_type impedance_controller = 100.0 *(reference-iiwa.joints ())-10 *iiwa.velocities ();
@@ -228,8 +228,8 @@ struct ViewFiltering : public curan::robotic::UserData
228228 state.cmd_tau = vector_type::Zero ();
229229
230230 currentTime += iiwa.sample_time ();
231- state.user_defined2 = actuation ;
232- state.user_defined3 = iiwa. gravity () + iiwa. coriolis () ;
231+ state.user_defined2 = iiwa. velocities () ;
232+ state.user_defined3 = joint_vels ;
233233 prev_tau = iiwa.measured_torque ();
234234 prev_filtered_torque = raw_filtered_torque;
235235 for (size_t index = 0 ; index < curan::robotic::number_of_joints; ++index){
0 commit comments