Skip to content
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

Get Raw Data #28

Open
NeighborDva opened this issue Jan 11, 2024 · 14 comments
Open

Get Raw Data #28

NeighborDva opened this issue Jan 11, 2024 · 14 comments

Comments

@NeighborDva
Copy link

Hello.

First of all, I checked the operation of the package you developed in the Noetic environment. (using g29, g923 wii be tested )

I'm curious about the source code of the package

Can I get raw data or adjust gain value and Autocenter strength like oversteer?

@kuriatsu
Copy link
Owner

Thank you for testing!

You can't realize what you want only with parameter tuning?
You can get raw data from e.g., /dev/input/event13.

@NeighborDva
Copy link
Author

Thank you for testing!

You can't realize what you want only with parameter tuning? You can get raw data from e.g., /dev/input/event13.

Unfortunately.

The G923 is a 900-degree product, so it is excluded from the test handle.

I'm looking for 1080-degree support products, so I think only Trustmaster products will be available.

Looking at the code you uploaded, I thought it was written based on linux/input.h.

Can Trustmaster's products also control the handle with force feedback based on the Linux/input.h library?

I'd like to get some advice.

@kuriatsu
Copy link
Owner

Yes, you are right. This code is based on input.h.
Whether Thrustmaster will work or not is up to kernel support.
If fftest works on Thrustmaster, this code seems to work.

@kuriatsu
Copy link
Owner

Last time I tried Thrustmaster (4 years ago?), fftest didn't work.
I forgot the model.

@NeighborDva
Copy link
Author

Thank you for your response and advice.

I'll give it a try.

Thank you.

@NeighborDva
Copy link
Author

NeighborDva commented Jan 24, 2024

I have a question from the package you developed.

g29 What is unit of 'torque' and 'position' parameters in position control?

If possible, I would appreciate it if you could tell me the units of other parameters.

and How should I improve the noise of the steering wheel when controlling the wheel position?

@kuriatsu
Copy link
Owner

Both of them are -1.0 to 1.0
Torque is 1.0=2.5Nm, position 1.0=450 degree clockwise
Is there still fluctuation? Then, please change brake position, brake torque in g29_force_feedback.yaml, and rotation torque of ros message.

@NeighborDva
Copy link
Author

NeighborDva commented Jan 25, 2024

As you told me
brake_position,
brake_torque_rate,
auto_centering_max_torque, auto_centering_max_position

I tried adjusting, but still gear noise occurs when the steering wheel rotates.

Does it happen because it gives too many consecutive values for the target postition?

Or is it a problem caused by the structure of g29 itself?

First of all, I prepared operation videos through YouTube links to make my questions easier to understand.

These are comparative videos of the operation of the carla example and the program I wrote.

The program I wrote is a program that controls g29 by taking the angle of the actual vehicle.

As you can see from the video, the program gear noise I wrote is relatively higher than the carla example.

Program operation Viedo link
https://youtu.be/nVo8s7SznS0

Carla Operation Viedo Link
https://youtu.be/LZPN6nXRhdI

So, referring to the target topic sent by carla
I modified the target position value that was used up to the second decimal place to use only the first decimal place.

When that happens, the noise is relatively reduced, but it feels like it is operating as the operation is cut off, and the noise is still occurring.

Program operation(use only the first decimal) Viedo link
https://youtu.be/IjkUFrvzMQI

@kuriatsu
Copy link
Owner

kuriatsu commented Jan 25, 2024

I guess the target position you specified is too close to the current wheel position (angle).
The wheel tried to rotate and stop in short intervals and produced this noise.
The objective position should be the final position instead of the incremental position.
E.g., If the current position = 0, the objective position = 90, then specify 90, not 5 in the next time step.

Slowing down the update rate is also the solution.

@NeighborDva
Copy link
Author

I lowered the constant level value of the m_effect variable (0x3fff-> 0x3dd) in the uploadFore function and use the method you told me.
the problem was solved to some extent.

Thank you.

@NeighborDva
Copy link
Author

I have a question about the position data range.

Is it possible to modify the code in the range -450 to +450 instead of -1.0 to 1.0?

@kuriatsu
Copy link
Owner

Yes, you can.
You need to modify the calculation of m_position, though.

@NeighborDva
Copy link
Author

Thank you for your answer.

Looking at the code, if I change the range of m_position, I think the variables in the calcRotateForce and calcCenteringForce functions should also be changed to fit the range of m_position.

For example, can I change the m_eps m_auto_center_max_position of calcCenteringForce and the m_eps and m_brake_position of calcRotateForce to be the same as m_position?

@kuriatsu
Copy link
Owner

Yes, that's right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants