-
Notifications
You must be signed in to change notification settings - Fork 7
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
No data from active joint encoders #3
Comments
Hi Kamil, Hmm, that is odd, I haven't see this before. Can you try one thing, close the ros application, (i.e. terminate |
Hi Adnan, I tried it. But it does not change. I mean that three active encoder joint positions are still 0,0,0 and pose.positions x,y,z are still 0,-110,-35. However, the other gimbal positions and orientation are changing. It is really strange case. |
Yeah I haven't seen this one before. I do not have a device with me for a few months to test this out for myself. Looking at the code, the HDCallbackCode HDCALLBACK device_state_callback(void *pUserData) {
DeviceState *device_state = static_cast<DeviceState *>(pUserData);
if (hdCheckCalibration() == HD_CALIBRATION_NEEDS_UPDATE) {
ROS_DEBUG("Updating calibration...");
hdUpdateCalibration(calibrationStyle);
}
hdBeginFrame(hdGetCurrentDevice());
//Get angles, set forces
hdGetDoublev(HD_CURRENT_GIMBAL_ANGLES, device_state->rot);
hdGetDoublev(HD_CURRENT_POSITION, device_state->position);
hdGetDoublev(HD_CURRENT_JOINT_ANGLES, device_state->joints);
hdGetDoublev(HD_CURRENT_TRANSFORM, device_state->transform);
hduVector3Dd vel_buff(0, 0, 0);
vel_buff = (device_state->position * 3 - 4 * device_state->pos_hist1
+ device_state->pos_hist2) / 0.002; //mm/s, 2nd order backward dif
device_state->velocity = (.2196 * (vel_buff + device_state->inp_vel3)
+ .6588 * (device_state->inp_vel1 + device_state->inp_vel2)) / 1000.0
- (-2.7488 * device_state->out_vel1 + 2.5282 * device_state->out_vel2
- 0.7776 * device_state->out_vel3); //cutoff freq of 20 Hz
device_state->pos_hist2 = device_state->pos_hist1;
device_state->pos_hist1 = device_state->position;
device_state->inp_vel3 = device_state->inp_vel2;
device_state->inp_vel2 = device_state->inp_vel1;
device_state->inp_vel1 = vel_buff;
device_state->out_vel3 = device_state->out_vel2;
device_state->out_vel2 = device_state->out_vel1;
device_state->out_vel1 = device_state->velocity;
for(int i=0; i<3;i++){
if (device_state->lock[i]) {
device_state->force[i] = 0.3 * (device_state->lock_pos[i] - device_state->position[i])
- 0.001 * device_state->velocity[i];
}
}
hdSetDoublev(HD_CURRENT_FORCE, device_state->force);
//Get buttons
int nButtons = 0;
hdGetIntegerv(HD_CURRENT_BUTTONS, &nButtons);
device_state->buttons[0] = (nButtons & HD_DEVICE_BUTTON_1) ? 1 : 0;
device_state->buttons[1] = (nButtons & HD_DEVICE_BUTTON_2) ? 1 : 0;
hdEndFrame(hdGetCurrentDevice());
HDErrorInfo error;
if (HD_DEVICE_ERROR(error = hdGetError())) {
hduPrintError(stderr, &error, "Error during main scheduler callback");
if (hduIsSchedulerError(&error))
return HD_CALLBACK_DONE;
}
float t[7] = { 0., device_state->joints[0], device_state->joints[1],
device_state->joints[2] - device_state->joints[1], device_state->rot[0],
device_state->rot[1], device_state->rot[2] };
for (int i = 0; i < 7; i++)
device_state->thetas[i] = t[i];
return HD_CALLBACK_CONTINUE;
} It may be possible that there in an update to the |
I am using a Geomagic Touch device with an ethernet connection. I did run |
It does not change for publishg sensor data. But, when I do catkin_make, now there is no warnings about double / floating. However, there is still warning for conflict on libncurses: Scanning dependencies of target device_node |
SOLVED :) In case you have some troubles and your first 3 values are 0, you probably don't have English set as main language. Thats a problem coming from Open Haptics. Simply add this to your ~/.bashrc
This is already written in Readme.md files. But I solved the issue changing all language settings as en_US.UTF-8 on my ubuntu. |
@RaMathuZen |
Yeah I can . Ping me through mail, my mail ID is in my GitHub profile. |
Hi,
I have 3D Systems' Touch device and run this package and device with ROS noetic on Ubuntu 20.04. I can calibrate and read all encoder data from Touch_Diagnostic. When I do roslaunch geomagic_control geomagic_headless.launch, I have these ros topic list:
rostopic list
/Geomagic/button
/Geomagic/force_feedback
/Geomagic/joint_states
/Geomagic/joy
/Geomagic/pose
/Geomagic/twist
/rosout
/rosout_agg
/tf
/tf_static
When I echo all ros topics, I recognize that there is data coming from buttons and passive wrist joints (from gimbal encoders) but not from active joints such as
when I do rostopic echo /Geomagic/joint_states, only gimbal positions are published:
position: [-0.0, 0.0, 0.0, 2.5234922488504132, -2.9634022653083116, 4.908947141962596]
or when I do rostopic echo /Geomagic/pose, only orientation data are published:
pose:
position:
x: 0.0
y: -110.0
z: -35.0
orientation:
x: -0.405031046104968
y: -0.036064943439096685
z: -0.6450909096350691
w: 0.6469210967625927
Do you know that is there any reason for that?
Thanks,
KC
The text was updated successfully, but these errors were encountered: