Skip to content

How to use low pass filter in your case? #26

Description

@Chunting

Hi,
Since there is so much vibration in my application, I want to use your low_pass_filter to reduce it,but I encounter some problems.
According to your example in kuka_driver.cc, I applied it into my project. This is the pseudo-code:

cutoff_hz = 250;
q_diff = currentJointPosition - previousJointPosition;

robot_dt = utime_now - utime_last_;  // 0.004s

joint_velocity_estimated = vel_filters_[i].filter(q_diff/robot_dt)

// kTimeStep =0.004s
diffToGoal = joint_velocity_estimated*kTimeStep;

utime_last_ = utime_now;

commandToSend = currentJointPosition + diffToGoal;

commandToSendPlusIPOJointPos = commandToSend + ipoJointPosition;

// Then send commandToSendPlusIPOJointPos to robot in every kTimeStep.

Is this procedure OK?
It seems strange to me that robot couldn't follow the path I planed.
I'm wondering if it is caused by diffToGoal = joint_velocity_estimated*kTimeStep, since I didn't find anything about how to integrate joint_velocity_estimated to commandPosition.
Would you please give me some suggestions or instructions?

Thanks,
Chunting

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions