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

Position_controller not working properly as wheel controller of mobile robot #342

Closed
HPCLOL opened this issue Jun 19, 2024 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@HPCLOL
Copy link
Contributor

HPCLOL commented Jun 19, 2024

I am trying to use ROS2 to make a mobile robot move in Gazebo, and the mobile robot just looks like a vehicle with four wheels. For some reason, I use the position_controller to control each wheel. When I post a series of trajectory points to the position controller, the wheels rotated but the robot did not move, as if it is slipping. When I replace the controller with the velocity_controller or effort_controller , the wheels can drive the robot to move normally. I have checked the URDF file and there are no issues with the contact and friction between the wheels and the ground.

I want to know why this happens and want to control the wheels through the position_controller to make the robot move.

My ros2 version is iron, and I use gazebo classic.

Thank you so much!

@HPCLOL HPCLOL added the bug Something isn't working label Jun 19, 2024
@christophfroehlich christophfroehlich transferred this issue from ros-controls/ros2_control Jun 19, 2024
@christophfroehlich
Copy link
Contributor

I guess this is the same result as described here #240.
You could use https://control.ros.org/rolling/doc/gazebo_ros2_control/doc/index.html#using-pid-control-joints to overcome this issue.

@HPCLOL
Copy link
Contributor Author

HPCLOL commented Jun 19, 2024

I guess this is the same result as described here #240. You could use https://control.ros.org/rolling/doc/gazebo_ros2_control/doc/index.html#using-pid-control-joints to overcome this issue.

Thank you so much, it works when I replace the command interface of original joints with pid-control-joints!

But I have a suggestion, the command_interface name for pid-control-joints should be "position_pid" but "position_PID" in https://control.ros.org/rolling/doc/gazebo_ros2_control/doc/index.html#using-pid-control-joints.

Actually, I noticed this webpage earlier and tried to use the pid-control-joints, but the controller did not activate successfully because the command interface name was incorrect. I didn't pay attention to this at the time and gave up trying to use it.

Thank you again!

@christophfroehlich
Copy link
Contributor

But I have a suggestion, the command_interface name for pid-control-joints should be "position_pid" but "position_PID" in https://control.ros.org/rolling/doc/gazebo_ros2_control/doc/index.html#using-pid-control-joints.

I see, thanks for reporting. Do you mind submitting a PR to fix the docs?

@HPCLOL
Copy link
Contributor Author

HPCLOL commented Jun 19, 2024

Do you mind submitting a PR to fix the docs?

Ok, I will submit a PR later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants