-
Notifications
You must be signed in to change notification settings - Fork 12
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
joint_state topic value not accurate #3
Comments
I will see if I have time on the weekend to check this issue ... |
Hi Inho Sorry, currently I am a bit busy ... I uploaded my Yocto build setup as https://github.com/Hacks4ROS/h4r_ev3_build I will check for the sign issue, as soon as I can. Regards, Christian On 02.08.2016 01:59, inhok996 wrote:
|
Hi, I can confirm this issue. I am using the motors.launch file along with motors.yaml.
and by selecting the position controller (ros_control):
Obviously, we must start our controllers, e.g. by loading the controller_spawner with If I now send positions to the controller, e.g. alternating +1,-1,.., By the way, thank you for this awesome project! Regards, Christoph |
Currently I do not have a EV3 at hand. Could one of you check if the value in /sys/class/tacho-motor/motorX/position is actually negative? |
thanks, I tried that and Edit: With ros_control / ev3_manager turned off, the position |
Even if ros_control/ev3_manager turned on, /sys/class/tacho-motor/motorX/position |
I think I have found the reason for the issue in In order to fix this, the negative speed or position (depending on the control mode) can be commanded directly to the tacho-motor driver without changing polarity. The issue can be reproduced by trying the following commands directly with the ev3 tacho-motor driver (connect to the ev3 via ssh, but do not start the ev3_manager):
I would try to recompile the yocto image on my own in order to try out changes in the controller, Some additional findings that I have noticed during code checking:
Thank you for your support! Best regards, Christoph |
Hi again, Btw. As mentioned before I could not test it ;-) Regards, Christian |
Thank you for the fix. See contents of the deb file:
|
Oh yes ... right sorry ... fixed that now |
Do you have the debian package containing the binary in non-debug mode as well? I have only found the dev and dbg package here https://github.com/Hacks4ROS/h4r_ev3_ctrl/releases/tag/hf-i3-0.1 Thanks again for the hot-fix and your quick support! EDIT: By trying to run the ev3_manager compiled in debug mode (h4r-ev3-manager-dbg_0.1-r0_armel.deb), I get the following error: |
What the ... did I do ... well probably I selected the wrong file to upload ... upload file selector is somehow a bit broken in Kubuntu ... now it is there, sorry for that. |
no problem! ;-) I was able to install the deb successfully. Unfortunately, the issue hasn't been resolved. I wanted to check the packaged source code, if the fix is actually in the hot-fix deb. Could the same apply to the non-debug deb-package? |
Ok now I got it to compile ... I checked that now it should have the change inside. Saw it in the debug package. Previously it compiled the old version. |
Hi Christian, Now it is not possible to drive backwards anymore. Whenever I command a negative velocity,
I found the reason for that in your code, it's just a minor mistake which can be fixed easily I guess:
Hence, for negative values, only the "-" sign is written to the sys-driver. A fix would be to perform the loop with the absolute value after determining if value is negative. I can also make a pull-request into the hotifx branch if you like. Big thanks again! PS: are you compiling the package with a simple cross-compiler resp. a docker image? Or do I need to get the full yocto layer compiled in order to add further non-included ros_controllers? |
Check now, I changed the function now this way:
|
@croesmann Does it work now? |
Hey Christian, yes, the velocity mode works like a charm now (forward and backwards). The received positions are correct! Thank you! There is still an issue with the position mode. But I think it is not related to this topic here, so I open a new issue report. This one might be closed. |
Hello~! I've been making my ev3 autonomous using ROS. I used motors.launch so that I could use the topics which I can make my ev3 move(outPortA(B)/command) and construct odometry information(joint_states).
motors.launch worked successfully but I have an issue. When I publish minus value to /ev3dev/outPortA(B)/command, joint_state position and velocity value increase. This makes me hard to make node for odometry.
The text was updated successfully, but these errors were encountered: