You can use ANY hardware with ros2_control

Поділитися
Вставка
  • Опубліковано 1 жов 2024

КОМЕНТАРІ • 103

  • @evanlane1690
    @evanlane1690 Рік тому +53

    These tutorials are making ROS accessible for a ton of people, including me. I'm a hobbyist, and I don't always have the time to do deep dives into documentation and codebases. Being able to use these tutorials to get a good foundation has been extremely helpful.

  • @sport99421
    @sport99421 9 місяців тому +20

    You call yourself a hobbyist while acting more like a professor to most of us. Hope you get the recognition you deserve and continue to grow.

  • @atticusrussell1225
    @atticusrussell1225 Рік тому +16

    Josh this is literally the task I have to do for my project today. I haven't watched the video yet but I was dreading the task due to the lack of documentation. Have been putting it off for a bit. You're an absolute legend and a hero. Can't even express how excited I was to see the title.

    • @juandvergara
      @juandvergara Рік тому +1

      So do i, its amazing how he reads our minds, hahaha.

    • @ArticulatedRobotics
      @ArticulatedRobotics  Рік тому +1

      Haha thanks guys I'm so glad to hear it - and I hope it was helpful once you did watch it!

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

      @@ArticulatedRobotics Yeah it was very helpful. Thank you!
      I'm wondering if you've seen the tool ros_team_workspace which can generate templates for hardware interfaces, controllers, URDF, and many other things interactively from the command line, and in addition adds CI testing to a GitHub repo. Also adds useful aliases. I think you'd find it useful, and if you do a short video exploring it might help many more people be aware of it.

  • @DavidNewmon
    @DavidNewmon Рік тому +4

    Performance here is critical, and especially on the Arduino side. Make sure you read the Serial I/O data one byte at a time, and make sure you loop through the bytes: while(Serial.available()) { char ch = Serial.read(); } ... calculate, and control the motors as quickly as possible in loop() and keep everything straightforward (no classes, data structures, etc). All simple functions and global variables. I learned the hard way and my robot was jerky, twitchy, and not good at driving around.

  • @LucasMOV394
    @LucasMOV394 4 місяці тому +1

    What code did you use in the arduino?

  • @jonathanr4242
    @jonathanr4242 9 місяців тому +2

    fantastic. thank you, Josh. I should also mention that example_2 was updated on the repo a couple of weeks ago to use TwistStamped messages, which means it might not work with the teleop_twist_keyboard. I tried to map the cmd_vel to cmd_vel_stamped, but it didn't work. I ended up sending messages from the cli. Maybe try to insert this line into the /config/diffbot_controllers.yaml file (under ros parameters).
    use_stamped_vel: false

    • @AhmedMagdy-xb8bl
      @AhmedMagdy-xb8bl 7 місяців тому

      Exactly the same.

    • @RoboMech48
      @RoboMech48 5 місяців тому

      jonathanar can you help me?

    • @ShahFaisalWani14
      @ShahFaisalWani14 9 днів тому +1

      You can simply use teleop_twist_keyboard and pass stamped true like this ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args --param stamped:=true This is because the diff drive controller expects /cmd_vel [geometry_msgs/msg/TwistStamped]

    • @jonathanr4242
      @jonathanr4242 9 днів тому

      @@ShahFaisalWani14 thank you.

  • @divy04
    @divy04 3 місяці тому

    fatal error: hardware_interface/base_interface.hpp: No such file or directory
    7 | #include "hardware_interface/base_interface.hpp"
    | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    compilation terminated.
    same error as discussed in the thread, please help, using ros2 humble

  • @isrg7221
    @isrg7221 Рік тому +1

    Hi Josh, can you clarify how you are getting the connection string to the robot " /dev/serial/by-path/platform-fd500000.pcie-pci-0000:01:00.0-usb-0:1.3:1.0-port0", my serial connection is failing when connecting to the arduino, also is there a way to simulate serial connection so I can see it on a terminal instead of receiving the string in an actual device. Great Tutorial by the way

  • @engiucation
    @engiucation Місяць тому

    Anyone have tried doing this without Arduino?
    Connecting the GPIO pins of the Raspberry Pi straight to to the system?

  • @0jeetparmar0
    @0jeetparmar0 Місяць тому

    how do i use teleop with carlikebot ?? in ros2_control_demo anyone knows how?
    thanks

  • @rahultom4310
    @rahultom4310 5 місяців тому

    Hii,
    Can I control and communication with Pioneer 3DX robot using ros2_control which designed to supported by the ARIA, a C++, package or library?
    Your reply will be very helpful for me.

  • @patrykgrzywnowicz5710
    @patrykgrzywnowicz5710 2 місяці тому

    With your channel I started taking my first steps with ros2, thanks! I have a question, do you know what is the correct procedure for closing an application using ros2_control so that, for example, the hardware interface calls the on_deactivate function? Currently, I am making a ros2 srv call from the controller level to request a change of state in the hardware interface, but I don't like this approach. Unfortunately, after changing the state to inactive in the controller, the hardware interfaces remain in the active state..

  • @nunobartolo2908
    @nunobartolo2908 Рік тому +1

    the cpp code that is processing the encoder counts is running in the py or in the arduino? didn't see you flash the arduino

  • @weeklyrobotics7884
    @weeklyrobotics7884 Рік тому +5

    Awesome work Josh! Many thanks for sharing and going into the nitty gritty details!

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

      Thanks!!

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

      Wow, this was commented 3 days before this video was published...

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

      @@_a_x_s_ We are in a business of finding all quality robotics content before it even comes out, but let's keep this a secret!
      On a more serious note, If you are a Patreon supporter of Josh, you get early access to the content. I highly recommend this as Josh is doing an amazing service for everyone looking to learn some advanced ROS.

  • @remiscarrlet
    @remiscarrlet 4 місяці тому +1

    I wrote most of my thesis project using your videos. In a sense, i should list you as a supervisor :D Thank you so much for these videos, I know how much time it takes to make them and I want you to know these are so so very appreciated.

  • @hoangha8065
    @hoangha8065 4 місяці тому

    How can you type so effective? Is there any extension or just vscode shortcuts?

  • @pranavshevkar269
    @pranavshevkar269 7 місяців тому +1

    Your videos have helped me tremendously in my career as a robotics engineer. Could you please make a series on Movit2

  • @matteocarlone6503
    @matteocarlone6503 Рік тому +1

    So cool! As all of your videos..
    Can you do something about OpenRMF framework from open robotics! I would love it

    • @ArticulatedRobotics
      @ArticulatedRobotics  Рік тому +1

      Thanks! I'll put it on the list, but OpenRMF is something I know very little about, and is also fairly low in terms of things I plan to learn more about, so you'll probably be waiting a while before I do a tutorial on it I'm afraid!

  • @QuantumRob-yt
    @QuantumRob-yt 2 місяці тому

    You said in here you were connected to the robot via SSH for VScode but didn't go into how. Personally having been using linux for a long time on multiple machine. I use the SSH -Y user@hostname with X11 forwarding enabled in SSHD_CONFIG. Then anytime I use that terminal window, XWindows just pops up the display on my local linux (WSL or an actually dev Ubuntu box). This is a super easy way to just control anything from the linux box you're SSH'd into. I just run the VS Code directly on the robot and have the display show on my local. You might be just using SSH for file transfer but wanted to share in the event you havent tried this yourself.

  • @Build_the_Future
    @Build_the_Future Рік тому +1

    In the future, I hope you can cover Nvida Isaac Sim.

  • @Josuzare
    @Josuzare 3 місяці тому

    Gracias, genio

  • @MayankMukesh-m9w
    @MayankMukesh-m9w Рік тому

    I need an ROS2 control plugin for the Open Manipulator-X arm (hardware). I'm trying to write it because I haven't found it open-source. However, I'm new to this, so any help would be appreciated.

  • @juanpaez8039
    @juanpaez8039 11 місяців тому

    Hi. I'm new here but i got a problem with diff controller. When I use the teleop_keyboards, it seems nodes are correctly but my robot doesn't move. I don't understand what happend

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

    I installed ros2 humble on pi 4 it runs the examples but wont open with ros2 command even if I source bash first . It's there but wont open thanks for any help.😁👍cool video!

  • @hiteshjain-c8p
    @hiteshjain-c8p Рік тому

    Hey Josh, can I add additional sensors to the interface?
    how do I add IMU to this? I just need to know if I'm editing the right file. I'm a noob, please help.

  • @mr.p215
    @mr.p215 7 місяців тому

    Hi Josh, I doubt you will see this but I wanted to ask,
    The robot we are building for a project does not have encoders on the wheels instead we get the odometry with the lidar, this means that the motors only take an input, what do I need to change for the hardware interface for this to actually function?

  • @h2o11h2o
    @h2o11h2o Місяць тому

    blog please~

  • @TheOjayyy
    @TheOjayyy 3 місяці тому

    Thank you! 🙌

  • @oscarbest5744
    @oscarbest5744 Рік тому +1

    Does anyone else get the TextSubstitution error when running the diffbot.launch example? I'm just running the example_2 launch file but i haven't edited anything yet, was wondering if there's been a recent update?

    • @oscarbest5744
      @oscarbest5744 Рік тому +2

      Installing xacro sorted it 😊

    • @quentinmalfroid5406
      @quentinmalfroid5406 9 місяців тому

      Hi, thank you for your auto answer ! That help me to resolve this error ! Thank you so much to help community

    • @quentinmalfroid5406
      @quentinmalfroid5406 9 місяців тому

      @@oscarbest5744 Tank you !

  • @mr.p215
    @mr.p215 7 місяців тому

    If I don't have wheel encoders and am instead generating the odometry with a lidar, how should I go about creating the controller?

  • @XONAPA01
    @XONAPA01 11 місяців тому

    Awesome videos sir! I have a question, you have been writing all the nodes as a .launch.py file but not as a pub/sub Python file. Is there any specific reason?
    Thank you so much sir.

  • @8bit711
    @8bit711 Рік тому +1

    Cheers Josh! I know how im spending my Sat night.

  • @simonlop
    @simonlop Рік тому +1

    First of all, congratulations on this great video. I have been working on something for several days now. I am trying to create a hardware interface that reads data from a topic (I am using micro-ROS and cannot find another way to do it). The only idea I had was to implement a socket to another node acting as a server. Do you have any ideas if it is possible to use topics directly in the hardware interface?

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

      This can be done, I made all of the I/O with the hardware itself async (running in another process). It really didn't work very well... data just got backed up into a queue in the DDS implementation and I ended up sending commands to the motors that were very old. I need to change the QoS settings on the topic so that it discards older messages automatically. My setup used a control hardware interface like in the video, but I published the commands to a topic. Then I created another node/script that subscribed to that topic and handled the hardware device.

    • @DavidNewmon
      @DavidNewmon Рік тому +1

      You can create Nodes directly, and from there call create_subscriber, create_publisher. I did this inside of a background thread function:
      rclcpp::Node::SharedPtr processing_node = rclcpp::Node::SharedPtr(new rclcpp::Node("MyControlHardwareBackgroundNode"));
      velocity_publisher_ = processing_node->create_publisher(ASYNC_VELOCITY_TOPIC, 10);
      encoder_subscription_ = processing_node->create_subscription(ASYNC_ENCODER_TOPIC, 10,
      std::bind(&MyControlHardware::on_encoder, this, std::placeholders::_1));
      while (!thread_exit_ && rclcpp::ok()) {
      rclcpp::spin_some(processing_node);
      }

  • @connor2729
    @connor2729 7 місяців тому

    I have a question, does this ros control code needs to run on Linux with ros or needs to run on the microcontroller with microros or rosserial. And if the code run on Linux what should run on the microcontroller to allow the ros comunication and wich topics should it publish/subscribe

  • @leonardogarberoglio3611
    @leonardogarberoglio3611 11 місяців тому

    I saw all of your videos about ros2_control and they are really good material. I think that you should make a video using microROS on your microcontroller and so you will have everithing under ROS2

  • @ngocainguyen1664
    @ngocainguyen1664 11 місяців тому

    Thank you for your wonderful video. Can i ask you a question about how the robot on rviz2 moving even though the wheel does not rotate?

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

    Hello! a big fan here. May i ask if what is the point of this if I can just use a calculation to convert cmd_vel (from Twist) to left and right motor velocity? And with a Lidar, I'll just use a laser scan matcher for the odometry of the robot.

  • @dmranganath
    @dmranganath 11 місяців тому

    HI,
    It was a great lecture, thanks for sharing with us. I was able to follow most part of it, but i was unable to understand where input and output ports to arduino are connected in the hardware interface plugin.
    thanks a lot for sharing with us.

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

    Is there any special integration between ros control and micro Ros?

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

    Can you make a video that involve c++ algorithm to control real robot with ros

  • @prathamgyanani5132
    @prathamgyanani5132 7 місяців тому

    Which ros version are you using for this , ros2-focy or any other ??

  • @techcracker4566
    @techcracker4566 Рік тому +1

    Great job! Thanks for all of your eye opening videos, keep it going🎉

  • @diystudio1778
    @diystudio1778 8 місяців тому

    Please make video on tricycle controller 🙏

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

    is the process similar for ros1_control too ??
    glad to see that you are getting sponsors ( meaning you will keep uploading ) , you deserve it.

  • @ManojM-p4q
    @ManojM-p4q 4 місяці тому

    Thanks for the tutorial mate

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

    update your course to humble please!
    Lastly, I would like to grateful to you for your teaching

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

      He already did, check out the previous video on the channel.

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

    I'm curious if you know of any systems that are "bigger" than rviz2, which can do more mission-level stuff. There's the "Commander API" in ros-navigation, but is there anything more big-picture out there that would make it easy to create some repeatable mission route of some sort?

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

      You can use waypoint navigation, and read in data from a text file for the waypoints.

  • @martijnmartijn
    @martijnmartijn 7 місяців тому

    This video is truly a lifesaver, thanks!

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

    You are amazing, thank you very much !!

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

    for hardware_interface, seems on_deactive, on_cleanup and on_shutdown will not be called and can not be graceful shutdown. do you know how they work?

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

      This is a great question and I almost covered it in the video. So those will be called IF you use the appropriate service call to deactivate/shutdown the hardware interface. This WON'T happen if you just interrupt it in the terminal with Ctrl-C, but would be used as part of a broader, structured system.

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

      @@ArticulatedRobotics thanks for the answer. but why they don't implement auto graceful shutdown for hardware interface? is their any concern for that?

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

    Thank you Josh for the best videos as always! I just have a question tho, if I were using a robot with a mecanum drive, would I just expand the plugin to account 4 motors? How does ros know how to deal with the very different kinematics then, I feel like I don't really grasp where the kinematics of a mecanum drive should be written

    • @ArticulatedRobotics
      @ArticulatedRobotics  Рік тому +1

      Yeah great question! If you check out my other video on ros2_control there are two halves to the solution, the hardware interface and the controller. So yep for the hardware interface you just expand it to 4 motors, but you'll need a completely different controller. Here are the ones that come with ros2_control, you'd probably need to copy one and write your own (or find someone else who's done it) github.com/ros-controls/ros2_controllers

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

      ​@@ArticulatedRobotics Aha, that makes a lot more sense now, thank you so much Josh very grateful for your help!

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

    This video couldn't have come at a better time! I stared building my first robot last weekend and this weekends job is building the hardware internet for my motor controller. Great tutorial

  • @АлексейЛатыш-э2в

    Good day and thanks for the video!

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

    Hi @JoshNewans How could i do if i am using in Foxy ?

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

      The same ros2_control demo code is available for foxy so you can find the appropriate branch/commit and start from there, but the rest of my instructions will be harder to follow as things have changed. The concepts are the same though.
      But you should swap to humble as foxy is EOL now!

  • @robertvirnau6990
    @robertvirnau6990 7 місяців тому

    hello! thanks for this great video! I am new to ROS2. When building then running the example 2 package I get :
    [ERROR] [launch]: Caught exception in launch (see debug for traceback): executed command failed. Command: /opt/ros/humble/bin/xacro /home/bobby/control_ws/install/ros2_control_demo_example_2/share/ros2_control_demo_example_2/urdf/diffbot.urdf.xacro use_mock_hardware:=false
    Captured stderr output: error: package not found: "package 'ros2_control_demo_description' not found, searching: ['/home/bobby/control_ws/install/ros2_control_demo_example_2', '/opt/ros/humble']"
    when processing file: /home/bobby/control_ws/install/ros2_control_demo_example_2/share/ros2_control_demo_example_2/urdf/diffbot.urdf.xacro
    rosdep gives me:
    rosdep install -i --from-path src --rosdistro $ROS_DISTRO -y
    ERROR: the following packages/stacks could not have their rosdep keys resolved
    to system dependencies:
    ros2_control_demo_example_2: Cannot locate rosdep definition for [ros2_control_demo_description]
    any ideas on what to do to fix this. A quick internet search sent me many directions... I am going to try going through the ros2_control docs and tutorials as well.

    • @robertvirnau6990
      @robertvirnau6990 7 місяців тому

      figured out. sometimes you just have to keep swimming :). I saw that ros2_control for humble was failing on the website, so I upgraded to iron. Not sure if that was my issue, but it works now.

    • @AhmedMagdy-xb8bl
      @AhmedMagdy-xb8bl 7 місяців тому +1

      Just copy the ros2_control_demo_description folder to control_ws/src then build your work space and you will get rid of this error.

    • @RoboMech48
      @RoboMech48 5 місяців тому

      @@AhmedMagdy-xb8bl hello sir can you help me?
      i am facing issues?

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

    An awesome 45 minute thank you

  • @quentinmalfroid5406
    @quentinmalfroid5406 9 місяців тому

    Incredible video !

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

    Great job!

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

    Is there a way to do the hardware setup using Python?

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

      Unfortunately not with ros2_control.
      You could create the entire control system in python though (i.e. a node that takes a twist or other command in, calculates drive commands, and sends them tot he motors)

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

    Best tutorial about hardware interfaces. Was craving for this👍

  • @MG.102
    @MG.102 Рік тому

    Hi josh one question is the pi3 with 1GB ram enough for uploading ros

    • @russhall1097
      @russhall1097 Рік тому +1

      I would say, "No." Even 2 GB is sketchy. 4 GB works much better. PI 4 with 4GB is good.

    • @ArticulatedRobotics
      @ArticulatedRobotics  Рік тому +1

      As Russ says below, unfortunately it isn't really. Maybe if you used a different OS but that is not properly supported. I'd also recommend the 4GB Pi 4.
      But if that's what you've got, try installing Debian. I think people have run it on arch too but that's a bit harder.

    • @ArticulatedRobotics
      @ArticulatedRobotics  Рік тому +1

      Oh and make sure you use an OS without a gui - Ubuntu Server may even be ok? But Debian headless would be better.

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

    i love this video series!!