Giter VIP home page Giter VIP logo

ros-g29-force-feedback's People

Contributors

finallion96 avatar kuriatsu avatar ncnynl avatar yukkysaito avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ros-g29-force-feedback's Issues

Wrong type conversion to `m_loop_rate` which make it dosen't work

In your code

timer = this->create_wall_timer(std::chrono::milliseconds((int)m_loop_rate*1000),

Since the cast operator has a higher precedence than the multiplication operator, the int cast will be applied to m_loop_rate rather than m_loop_rate*1000. If m_loop_rate<1 , then (int)m_loop_rate*1000=0, which causes the timer to invoke the loop function as fast as possible instead of the desired rate.

The code should be modified as follows:

timer = this->create_wall_timer(std::chrono::milliseconds((int)(m_loop_rate*1000)), 
            std::bind(&G29ForceFeedback::loop,this));

This issue may not have a significant impact on the final outcome, and you can choose to ignore it. However, if you decide to make modifications, it is recommended to also update the loop_rate in g29.yaml to 0.001.(My computer can read information from the G29 steering wheel approximately every 0.002 seconds, so I recommend setting the loop_rate to 0.001 in g29.yaml.)

Thank you for you and your code. I have learned a lot, and I wish you all the best!

Force feedback vanish

The force feedback is vanish after 70 sec when I try to upload the torque from the calcCenteringForce() function.
force feedback supported is fine and all init work well. first 70 sec the force feedback works very well after that it vanish all of the sudden.

G27 support

Do you happen to know if it works on the G27?

ROS1 branch does not build properly due to errors

I tried using the Ros1 branch to test it, but the g29_force_feedback.cpp had a few errors. I also think the package name did not matched because in one place was g29_steering_wheel and another was ros_g29_steering_wheel.

Also in the example code carla_control.py there is also a few mistakes that break the code like having init() with a client argument and also on timer_cb().

I also got another error in publishing with ros in that script because you have rospy.Publisher("/ff_target", ForceFeedback, 10) instead of rospy.Publisher("/ff_target", ForceFeedback, queue_size=10).

I fixed all of this and successfully used it and tested it.

I can create a pull request if you want to have a look

ERROR: force feedback is not supported

hello.

My system environment is Ubuntu 20.04, and my ROS 2 version is Foxy. I checked that my kernel supports force feedback as follows:
nc@nc:~/ros2_ws$ cat /boot/config-5.15.0-105-generic | grep CONFIG_LOGIWHEELS_FF
CONFIG_LOGIWHEELS_FF=y

But when I run [ros2 launch ros_g29_force_feedback g29_feedback.launch.py], I get the following results:

[INFO] [launch]: Default logging verbosity is set to INFO
--> Found handler at /dev/input/event5
[INFO] [g29_force_feedback-1]: process started with pid [5845]
[g29_force_feedback-1] Opening device : /dev/input/event5
[g29_force_feedback-1] device opened
[g29_force_feedback-1] FF_CONSTANT : 82
[g29_force_feedback-1] ERROR: force feedback is not supported
[ERROR] [g29_force_feedback-1]: process has died [pid 5845, exit code 1, cmd '/home/nc/ros2_ws/install/ros_g29_force_feedback/lib/ros_g29_force_feedback/g29_force_feedback --ros-args -r __node:=g29_force_feedback -r __ns:=/ --params-file /home/nc/ros2_ws/install/ros_g29_force_feedback/share/ros_g29_force_feedback/config/g29.yaml --params-file /tmp/launch_params_8fsyn5sx'].

How can I solve this problem? Looking forward to your reply.

G923 Support

Does that package work normally when I use the G923?

The pakage 's example has typos

rostopic pub /ff_target g29-force-feedback/ForceFeedback "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ''
angle: 0.3
force: 0.0
pid_mode: true"

This example has typos, it should be

rostopic pub /ff_target g29_force_feedback/ForceFeedback "header:
seq: 0
stamp:
secs: 0
nsecs: 0
frame_id: ''
angle: 0.3
force: 0.0
pid_mode: true"

Not working..

rosrun ros_g29_force_feedback ros_g29_force_feedback_node --ros-args --params-file catkin_ws/src/ros_g29_force_feedback/config/g29.yaml
ERROR: cannot open device : /dev/input/event14

Already change the event number in .yaml file, but still not working...

How to connect with LGSVL?

Hello @kuriatsu,
As mentioned in the title, how would we connect this Logitech G29 force feedback with LGSVL simulator? I have tried to install ROS2 bridge for LGSVL, but it is not working at all.
Thank you

Get Raw Data

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?

ForceFeedback.h: No such file or directory - Trouble setting up project on ROS1 branch

I am on Ubuntu 18.04 with ROS1 and following your readme in that branch I get the following error when I run catkin build.

Running a clean install and running catkin_make gives the same error.

catkin_ws/src/ros-g29-force-feedback/src/g29_force_feedback.cpp:8:10: fatal error: ros_g29_force_feedback/ForceFeedback.h: No such file or directory
#include "ros_g29_force_feedback/ForceFeedback.h"

No module named 'ros_g29_force_feedback'

Hi !
In other CARLA test files, my steering wheel has already encountered resistance. but when I was running ~/catkin_ws/src/ros-g29-force-feedback/examples$ python3.8 carla_control.py, the error 'No module named' ros_g29_force_feedback 'was reported. May I ask how to resolve it? Or is there any other way to test whether the steering wheel can be controlled in reverse through code?

How to implement this in Windows platform?

My Carla platform is installed on windows platform and I have installed ROS2-foxy. but I don't know how to realize the operation with linux counterpart in windows platform, how to utilize your method in windows platform?

Question : loop_rate meaning

@kuriatsu Is this code correct?
https://github.com/kuriatsu/ros-g29-force-feedback/blob/master/src/g29_force_feedback.cpp#L92
When the loop_rate is 10Hz, it seems that the timer is set to 10 seconds. Does loop_rate refer to timer_period rather than the cycle?

Additionally, if loop_rate indicates frequency, is the following code as you intended?
https://github.com/kuriatsu/ros-g29-force-feedback/blob/master/src/g29_force_feedback.cpp#L149
https://github.com/kuriatsu/ros-g29-force-feedback/blob/master/src/g29_force_feedback.cpp#L153

Could not run the command line "rosrun ros_g29_force_feedback g29_force_feedback_node"

Hello Kuriatsu:
My environment is ROS noetic on ubuntu 20.04. I had downloaded the code and runned the command line "rosrun ros_g29_force_feedback g29_force_feedback_node".But the code reported error that "
[rospack] Error: package 'ros_g29_force_feedback not found
" . I checked the package.xml and founded that the "
<name>g29_force_feedback</name>
" .So I runned the command line "rosrun ros_g29_force_feedback g29_force_feedback_node". But next I founded that ForceFeedback.msg which contained "

std_msgs/Header header 
float32 position
float32 torque

".
However in the examples that taker.py which contained "

      g29msg.angle = 0.0
      g29msg.force = 0.6

"
The taker.py in the examples did not match the ForceFeedback.msg. Could you help me that how to run the demo?

Thanks.

hi I want connect autoware.universe and g29

I notice autoware.universe
subscribe /vehicle/status/steering_status

stamp:
sec: 1679539267
nanosec: 645533388
steering_tire_angle: -0.3019617795944214

g29-force-feedback
publish /ff_target ros_g29_force_feedback/msg/ForceFeedback "header: {stamp: {sec:0, nanosec:0}, frame_id: ' '}, position: 0.3, torque:0.5"
so I want let position=steering_tire_angle、but i don't know how to achieve it, Can you teach me how to do it
my Email is [email protected]
Thanks you

How to connect to Carla with ROS1

carla_control.py is used for ROS2. But I want to connect to Carla with ros1 because I use ubuntu. Could you please share me your code with ros1. Thank you very much !

Unable to change device name in config file

I have ros melodic installed on my Ubuntu 18. I've followed all the instructions for the installation for ros1 and everything seemed to go smoothly. However even after changing the device name in the config file to let's say /dev/input/event9, I still get the following when doing rosrun

ERROR: cannot open device : /dev/input/event14

I've tried deleting and creating the workspace multiple times, ensured the config file is saved yet it still gives the same error. Can someone help with this?

wheel turns left and right in PID mode

Thanks for this helpful package.
I am facing an issue with the steering wheel not coming to the state of total rest when no angle is given... it comes to center but keep oscillating left and right.
I tried playing with the PID values but it did not help and increasing the offset does not help either.
Is there a way i can solve this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.