Це відео не доступне.
Перепрошуємо.

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...

КОМЕНТАРІ • 64

  • @shashwatpandey5165
    @shashwatpandey5165 4 роки тому +3

    Dude, don't stop!! Keep making ROS projects !

  • @teetanrobotics5363
    @teetanrobotics5363 4 роки тому +8

    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.

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  4 роки тому +1

      Yeah Sure. Thanks for the comment. Will start doing once Corona Lockdown is called off. Stay Safe :) .

  • @emoutraspalavras-marloncou4459
    @emoutraspalavras-marloncou4459 3 роки тому

    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!

  • @syrknight1693
    @syrknight1693 2 роки тому

    Very simplified and useful video, thanks.

  • @ramanabotta6285
    @ramanabotta6285 4 роки тому +1

    Thank you bro.. looking forward to see more videos ...

  • @FireSymphoney
    @FireSymphoney 3 роки тому +1

    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.

  • @nhannguyenvan3318
    @nhannguyenvan3318 3 роки тому

    Thanks. This's great and useful video

  • @francisalbertsinatraantoni6475
    @francisalbertsinatraantoni6475 2 роки тому

    you are the best ever man

  • @ivandagiant
    @ivandagiant Рік тому

    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?

  • @leninsanchez7571
    @leninsanchez7571 4 роки тому +1

    buena explicación, please... make more video about arduino and ros, gracias

  • @igorandrusyk2307
    @igorandrusyk2307 4 роки тому +2

    Thanks for this, bro!

  • @hexbevin2278
    @hexbevin2278 4 роки тому

    Thanks for sharing

  • @MarcusVinicius-lq3fe
    @MarcusVinicius-lq3fe 2 роки тому

    Hi congratulations! Nice Video. have better understood controllers in practice (hardware)

  • @pratikapte488
    @pratikapte488 2 роки тому

    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

  • @desi_europe_
    @desi_europe_ 3 роки тому

    Amazing Amazing tutorial, thank you for making it. Can you let me know how did you made connection between hardware and ros package?

  • @rishabhlal8750
    @rishabhlal8750 4 роки тому

    great video, what about your transmission interface?

  • @arjunsomasundaram644
    @arjunsomasundaram644 3 роки тому

    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.

  • @stephenzuccaro1090
    @stephenzuccaro1090 3 роки тому +1

    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?

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  3 роки тому

      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.

    • @stephenzuccaro1090
      @stephenzuccaro1090 3 роки тому +2

      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;
      }
      }

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  3 роки тому

      Thats a great suggestion. Thanks for sharing. I will try it.

  • @deepaku
    @deepaku 2 роки тому

    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

  • @shabnamsadeghiesfahlani7928
    @shabnamsadeghiesfahlani7928 2 роки тому

    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?

  • @zhenglin1872
    @zhenglin1872 4 роки тому

    Hey, thanks for sharing. Any code required in the arduino board
    to control the motor?

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  4 роки тому

      Yes, Code for this project is available in git hub. Link is below
      github.com/bandasaikrishna/ros_control_example

  • @sumitk2521
    @sumitk2521 3 роки тому

    How should I control bldc motor I m using raspberry Pi but motor is not running servo is working using pca9685 i2cpwm board

  • @hossamabdelaziz64
    @hossamabdelaziz64 3 роки тому

    Hello, good job btw but i have a question, how to simulate the dynamics of the model ?

  • @yehorsemeniaka6951
    @yehorsemeniaka6951 4 роки тому

    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?

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  4 роки тому

      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.

    • @anas77xd
      @anas77xd Рік тому

      me too using stepper motors for a mobile robot and i'm facing the same problem

  • @vuongnguyenphuc382
    @vuongnguyenphuc382 3 роки тому

    Thanks for this video. Can you explain for me this equation: pos = (encoderPos*360)/2200 ?. What's value "2200"?

  • @vuongnguyenphuc382
    @vuongnguyenphuc382 3 роки тому

    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?

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  3 роки тому +1

      Change the "Fixed frame" in base in "Global options" to base

    • @vuongnguyenphuc382
      @vuongnguyenphuc382 3 роки тому

      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?

  • @soksereysrey7090
    @soksereysrey7090 Рік тому

    Does it still work with Ros2?

  • @cuongcuong6507
    @cuongcuong6507 3 роки тому

    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]

  • @harshpalan
    @harshpalan 4 роки тому

    Hey I want use only l298N motor driver with Jetson Nano on ROS can you help me with that?

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  4 роки тому

      Hi Harsh Palan,
      I'm really sorry, I have no experience with Jetson Nano.
      Regards,
      Sai Krishna.

    • @harshpalan
      @harshpalan 4 роки тому

      @@roboticsandroslearning8232
      Anything with l298n and raspberry pi

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  4 роки тому

      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.?

  • @nguyenien4896
    @nguyenien4896 3 роки тому

    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

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  3 роки тому +1

      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.

  • @purushotham.h3833
    @purushotham.h3833 3 роки тому

    hey bro this is good and can u please give the cod for normal Arduino IDE Windows it's require urgent

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  3 роки тому

      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

  • @akhilsharma6704
    @akhilsharma6704 3 роки тому

    any other platform to contact ?

  • @ohaginias6609
    @ohaginias6609 3 роки тому

    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?

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  3 роки тому

      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

    • @ohaginias6609
      @ohaginias6609 3 роки тому +1

      @@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.

  • @delunchen4331
    @delunchen4331 4 роки тому

    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!

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  4 роки тому +1

      Hi,
      Download the below package in your workspace and then build.
      github.com/bandasaikrishna/3-DOF_Manipulator/tree/master/three_dof_planar_manipulator

    • @delunchen4331
      @delunchen4331 4 роки тому

      @@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!

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  4 роки тому

      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.

    • @roboticsandroslearning8232
      @roboticsandroslearning8232  4 роки тому

      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.

    • @delunchen4331
      @delunchen4331 4 роки тому

      @@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