Це відео не доступне.
Перепрошуємо.
Position and Velocity control of a DC motor Using PID | ROS control | rqt_reconfigure| Arduino
Вставка
- Опубліковано 1 сер 2024
- This videos explains how to control the position and velocity of a DC encoder motor using ros_control package. Show how check the behaviour of controllers using rqt_plot and dynamically change the values of P, I and D terms while the motor is running.
Link to source code of this Project:
github.com/bandasaikrishna/ro...
For more details on ROS_CONTROL package, go through below link:
www.rosroboticslearning.com/r...
Dude, don't stop!! Keep making ROS projects !
This would have been one of the best channels on UA-cam for learning Robotics and ROS programming ? Why did you stop? You're tutorials,explanations and core concept clarity are remarkable. Please post more such amazing content.
Yeah Sure. Thanks for the comment. Will start doing once Corona Lockdown is called off. Stay Safe :) .
I love practical tutorials. It is hard to only learn from simulations and codes and the stuff without real hardware, robot control! Thank you so much and keep up the good job! You could talk to the guy from Hash Robotics, he is learning and teaching ROS now and he has a humanoid robot awesome project, you could help him boost up his ROS learning!
Very simplified and useful video, thanks.
Thank you bro.. looking forward to see more videos ...
Amazing Amazing tutorial, thank you for making it. I love how your videos are very practical, by far one of the best I have seen.
Thank you for your Amazing comment 😀
Thanks. This's great and useful video
you are the best ever man
This was the video and page that really made me understand ROS control and got me past the point of implementing the hardware interface! Thank you very much, could you do an updated version for ROS 2?
buena explicación, please... make more video about arduino and ros, gracias
Thanks for this, bro!
You're welcome bro.
Thanks for sharing
Hi congratulations! Nice Video. have better understood controllers in practice (hardware)
Dude why did you stop posting videos?:( these are so amazing, pls continue making them, they're damn helpful, thanks for explaining ros like no one has :D
Amazing Amazing tutorial, thank you for making it. Can you let me know how did you made connection between hardware and ros package?
great video, what about your transmission interface?
For my final year project I am using a dc motor with an encoder as the actuator in a custom made, 3d printed 6-axis robotic arm which does a pick and place operation. Can u suggest me some tutorials or help me out with how to implement kinematics for the pick and place operation and also implementing pid to the actuators.
Thanks for the great tutorial. What is the reasoning to have a relatively slow control loop rate of 5hz? Could you make that higher like 100hz?
Arduino uno is not working good at higher rates to receive command(subscribe), execute(pwm) it and send feedback (via service server). For 100hz may be u can use different mcu which can handle the load.
Robotics and ROS Learning Yes, I have had that problem as well when nh.spinOnce() is in the main loop. I found that putting it inside a timer helps a lot. With this method, I am able to publish and subscribe at 100 hz
#define ROS_MESSAGE_CHECK 10000 // 0.01 seconds
elapsedMicros rosMessageCheck;
Void loop(){
if (rosMessageCheck >ROS_MESSAGE_CHECK) {
nh.spinOnce();
rosMessageCheck = 0;
}
}
Thats a great suggestion. Thanks for sharing. I will try it.
hi.. Thanks for your video. I am having issue with mine. My effort commands are always 0.(in write method) no pwm generation. I tried with hard coded pub array. Still no pwm output. Kindly help
I am trying to learn more about ROS and come across this interesting tutorial.
I am replicating what you did in your video/project shared here. But when I send a command for position control in rad the motor doesn't move. I have been working to resolve the problem for the last 10 days but I haven't been successful. Could you please help?
Hey, thanks for sharing. Any code required in the arduino board
to control the motor?
Yes, Code for this project is available in git hub. Link is below
github.com/bandasaikrishna/ros_control_example
How should I control bldc motor I m using raspberry Pi but motor is not running servo is working using pca9685 i2cpwm board
Hello, good job btw but i have a question, how to simulate the dynamics of the model ?
Dynamic is a gray area for me as well. But will work on it soon.
Very good job, but I have one question:
In case I am using stepper motor withoud encoder, so I have an open loop. How should I change a hardware interface file and what should I do in that case?
Thank you.
For stepper motors you can use position_controllers/JointPositionController. You can check my blog to understand how to write a hardware interface file and more about ROS control.
www.rosroboticslearning.com/ros-control
If you still have a question please don't hesitate to ask.
Thanks again.
me too using stepper motors for a mobile robot and i'm facing the same problem
Thanks for this video. Can you explain for me this equation: pos = (encoderPos*360)/2200 ?. What's value "2200"?
2200 is the total pulse per rotation (ppr or cpr) value
Thanks so much
Hi.. Thank for your video. I have got a problem when I launched check_urdf.launch or check_position_controller.launch. In Rviz, error Fixed Frame and RobotModel existed. Can you help me?
Change the "Fixed frame" in base in "Global options" to base
Robotics and ROS Learning when i run check_velocity_controller.launch, value PWM Cmd increases from 0 to 255, i don’t change your arduino code. Do you know what ‘s erorr?
Does it still work with Ros2?
im getting error, please help me
ERROR: cannot launch node of type [ros_control_example/single_joint_hardware_interface]: Cannot locate node of type [single_joint_hardware_interface] in package [ros_control_example]
Hey I want use only l298N motor driver with Jetson Nano on ROS can you help me with that?
Hi Harsh Palan,
I'm really sorry, I have no experience with Jetson Nano.
Regards,
Sai Krishna.
@@roboticsandroslearning8232
Anything with l298n and raspberry pi
Yes. I used L298N motor driver in this project to control the motor. And you can run this ros project on raspberry pi. So what help you need exactly.?
I do not understand that the formula of "(360.0*1000*(encoderPos-last_pos)) /(2200.0*(now - lastTime))" is in degrees/s, right? (While T = 500ms, And ROS is rad/s). Looking forward to hearing from you soon. Thanks
Hi,
Yes the equations in arduino os in degrees/sec. The conversation from degrees to radians and radians to degrees are done hardware_interface_node.
hey bro this is good and can u please give the cod for normal Arduino IDE Windows it's require urgent
Check this. Pid code in Arduino.
github.com/bandasaikrishna/using_rotary_encoders_without_interrupt_routine/blob/master/DC_motor_encoder_speed_control_using_hardware_circuit/DC_motor_encoder_speed_control_using_hardware_circuit.ino
any other platform to contact ?
U can call or text me on rosroboticslearning@gmail.com
I have a question about the member function read(), which belongs to the ROBOTHardwareInterface class. We know that we are receiving the position and velocity of the joint from the server using service communication. What is the advantage of using service communication here? Is it possible to replace this with topic communication?
Service is a request-reply type communication Where as topic is a broadcast-listen type communication. In hardware interface node, we want the values from the hardware only when we want (i.e., calling read() method). If you use topic here instead of service-client then your subscriber in hardware interface node will be called when ever the hardware publishes data but not when hardware interface node needs.
Anyways this was my way of implementation. You can implement in your own way either using topics or i2c or any other protocol.
Hope this answers your question.
Regards,
Sai Krishna
@@roboticsandroslearning8232 I see that the read() function uses the "Service & Client" communication protocol to get the real-time value of the joint.
That's very clear.
Thanks for that.
Thank you very much for your kindness.
This's an absolutely helpful tutorial for someone who's new to ROS, just like me. I was trying to practice it in my own laptop. However, t和following error came up while I catkin_make the workspace. Wondering if anyone got the same problem before? Not sure how to fix this issue :-( Any advice would be appreciated!
-- Could not find the required component 'three_dof_planar_manipulator'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by
"three_dof_planar_manipulator" with any of the following names:
three_dof_planar_manipulatorConfig.cmake
three_dof_planar_manipulator-config.cmake
Thank you!
Hi,
Download the below package in your workspace and then build.
github.com/bandasaikrishna/3-DOF_Manipulator/tree/master/three_dof_planar_manipulator
@@roboticsandroslearning8232 Wow! Thank you very much for helping me out. I tried to build this "three_dof_planar_manipulator" as you shared. It seems can't find "Floats_array.h", I wonder if this require me to edit the CMakeList?
[ 11%] Building CXX object three_dof_planar_manipulator/CMakeFiles/robot_hardware_interface.dir/src/robot_hardware_interface_node.cpp.o
In file included from /home/caris/three_dof_planar_manipulator/src/three_dof_planar_manipulator/src/robot_hardware_interface_node.cpp:1:0:
/home/caris/three_dof_planar_manipulator/src/three_dof_planar_manipulator/include/three_dof_planar_manipulator/robot_hardware_interface.h:12:55: fatal error: three_dof_planar_manipulator/Floats_array.h: No such file or directory
compilation terminated.
three_dof_planar_manipulator/CMakeFiles/robot_hardware_interface.dir/build.make:62: recipe for target 'three_dof_planar_manipulator/CMakeFiles/robot_hardware_interface.dir/src/robot_hardware_interface_node.cpp.o' failed
make[2]: *** [three_dof_planar_manipulator/CMakeFiles/robot_hardware_interface.dir/src/robot_hardware_interface_node.cpp.o] Error 1
CMakeFiles/Makefile2:481: recipe for target 'three_dof_planar_manipulator/CMakeFiles/robot_hardware_interface.dir/all' failed
make[1]: *** [three_dof_planar_manipulator/CMakeFiles/robot_hardware_interface.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j1 -l1" failed
Again, thank you for your time!
Floats_array.h is a custom service I have created in three_dof_planar_manipulator package. It should not give error. I made this package in ROS kinetic. May I know whoch version of ROS you are building it in.
And if you want to work with ros_control package only, then you can delete three_dof_planar_manipulator package from your worksapce (if you are not able to resolve above error) and edit package.xml file of ros_control package to remove dependency of three_dof_planar_manipulator package.
github.com/bandasaikrishna/ros_control_example/blob/master/ros_control_example/package.xml
I cannot remember the reason why I have added this dependency :).
Regards
Sai krishna.
@@roboticsandroslearning8232 Hello Sai,
Thank you for your time and suggestion. I'm using kinetic+ubuntu 16.04, and that error came out when I catkin_make the workspace where both three_dof_planar_manipulator and ros_control packages in my src file. It's weird that the same error still occurs after removing the three_dof_planar_manipulator dependencies in package.xml file.
I was searching online, someone has the similar problem said maybe edit CmakeList and add that three_planar_manipulator dependency would work. I'm still trying to figure that out at same time.
github.com/stereolabs/zed-ros-wrapper/issues/262
Best,
Dylan