ICube-Robotics / ethercat_driver_ros2

Hardware Interface for EtherCAT module integration with ros2_control
https://icube-robotics.github.io/ethercat_driver_ros2/
Apache License 2.0
125 stars 32 forks source link

slowly moving after enabling #100

Open wjx1991 opened 6 months ago

wjx1991 commented 6 months ago

Hi all, after running the code, the motor is enabled, but at the same the motor is moving slowly. I can't understand why the motor moves because I doesn't send position command in the code. When i use moveit2, it has errors :

[move_group-2] [ERROR] [1705040062.478931631] [moveit_ros.trajectory_execution_manager]: [move_group-2] Invalid Trajectory: start point deviates from current robot state more than 0.01 [move_group-2] joint 'joint1': expected: -1.34498, current: 1.46192

Is this error caused by the motion of the motor?

jaronski commented 5 months ago

Hi wjx1991, I guess you ran into the same problem i had with the ethercat_driver_ros2. Motor is slowly moving out of its default position? As i investigated while debugging the ethercat_driver i noticed that when starting the system inside of the code (// setup current position as default position) was getting called over and over again updating the default position by the "new" position resulting from the noise of the encoder values. After system got initialized and started i sent a command to the motor and noticed it is holding its position. The reason for introducing a counter is only to manage the "setup current position as default position" so the default position gets set once and then is waiting" for me to send new positions from moveit2 or from joint_states_publisher_gui or even from the command line. I know its not an elegant way to solve this issue but for my robot arm it works and i am waiting for the maintainers to come up with an alternative solution.

hope this helps and if you have further topics you would like to exchange maybe we can meet on discord

wjx1991 commented 5 months ago

Hi wjx1991, I guess you ran into the same problem i had with the ethercat_driver_ros2. Motor is slowly moving out of its default position? As i investigated while debugging the ethercat_driver i noticed that when starting the system inside of the code (// setup current position as default position) was getting called over and over again updating the default position by the "new" position resulting from the noise of the encoder values. After system got initialized and started i sent a command to the motor and noticed it is holding its position. The reason for introducing a counter is only to manage the "setup current position as default position" so the default position gets set once and then is waiting" for me to send new positions from moveit2 or from joint_states_publisher_gui or even from the command line. I know its not an elegant way to solve this issue but for my robot arm it works and i am waiting for the maintainers to come up with an alternative solution.

hope this helps and if you have further topics you would like to exchange maybe we can meet on discord

Hi, jaronski, I've been struggling with this issue for several weeks, making it difficult for me to control the robotic arm with moveit2. I have seen the solution you provided, and it indeed works. Now I can use moveit2. Thanks for your excellent solution. I have discord account. I am also looking forward to meet with you on discord.

wjx1991 commented 3 months ago

Hi wjx1991, I guess you ran into the same problem i had with the ethercat_driver_ros2. Motor is slowly moving out of its default position? As i investigated while debugging the ethercat_driver i noticed that when starting the system inside of the code (// setup current position as default position) was getting called over and over again updating the default position by the "new" position resulting from the noise of the encoder values. After system got initialized and started i sent a command to the motor and noticed it is holding its position. The reason for introducing a counter is only to manage the "setup current position as default position" so the default position gets set once and then is waiting" for me to send new positions from moveit2 or from joint_states_publisher_gui or even from the command line. I know its not an elegant way to solve this issue but for my robot arm it works and i am waiting for the maintainers to come up with an alternative solution.

hope this helps and if you have further topics you would like to exchange maybe we can meet on discord

Hi, jaronski, I use the ethercat_driver_ros2 to control my arm of 6 DOF. The slow movement issue is solved by using your solution. Now I develop the Moveit2 package and control the arm to move. New problems occur.

  1. when I send the command by joint_states_publisher_gui, the arm can move slowly and the magnitude is very small.
  2. when i start the system, the arm or the joints jitter.
  3. the real attitude of the arm is not coincide with that in rviz in moveit2 do you have these problems?
  4. the frequency in your code is 1khz, when i set it as 1khz error happens. could you please, if possible, provide your code .
jaronski commented 1 month ago

Hey @wjx1991 how can i find you on discord? I might help you better over there

wjx1991 commented 1 month ago

Thanks. What is your discord username, i will add and contact you on discord

---- Replied Message ---- | From | @.> | | Date | 05/08/2024 21:16 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [ICube-Robotics/ethercat_driver_ros2] slowly moving after enabling (Issue #100) |

Hey @wjx1991 how can i find you on discord? I might help you better over there

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

wjx1991 commented 1 month ago

Hi jaronski,my discord name is wjx16820138

---- Replied Message ---- | From | @.> | | Date | 05/08/2024 21:16 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [ICube-Robotics/ethercat_driver_ros2] slowly moving after enabling (Issue #100) |

Hey @wjx1991 how can i find you on discord? I might help you better over there

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>