Notifications
Clear all

Robot First Step

27 Posts
6 Users
5 Reactions
628 Views
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 318
Topic starter  

@aliarifat Thank you for the information/links.  I've been searching though the Yahboom learning sites trying to understand how the hardware components communicate and, more importantly, what they are communicating.  I ordered the Yahboom Robot Expansion Board V3.0, but I cannot find any description on what is transmitted/received (and why) across the serial link between the Pi5 and Expansion Board.  I would like to start slow with simple movements and steering of the chassis and write the code myself (to understand what is happening and how) versus loading the pi5 image from Yahboom and starting from there.  Not sure if I need to start with ROS or it can be added as the robot's functionality increases. 

I also see that I now need to learn about Docker!    


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 318
Topic starter  

@robotbuilder @byron

I purchased a chassis with Ackerman steering as recommended by @byron, and I'll use the Pi5 to run ROS2 and an extension card from Yaboom (ESP32-3 based)  to control the motors, servos, sensors, etc.  I've started this journey by learning ROS2.  I am going through the Ros2 for Beginners course on Udemy.  There are many ROS2 courses and I am looking for recommendations on what course to take next. 

I've looked at the course descriptions and I recognize some of the terms from the discussions on this forum: Odometry, Kinematics, etc., but they make no sense to me.  I am not sure what is relevant for use with Ackerman steering or if its all the same.  If you have a few minutes, would you take a look at the Udemy site (Udemy ROM2) and recommend the next 1 or 2 courses I should take?

Thanks

 

Mike


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 6 years ago
Posts: 2336
 

@huckohio 

Unfortunately I am completely unqualified to have any comment at all about using ROS.

Ideally you need guidance from those who have actually used it in a robotic project.

https://github.com/dblanding/diy-ROS-robot/blob/main/docs/learning-ROS.md

https://github.com/dblanding/diy-ROS-robot

An old thread on using ROS.

https://forum.dronebotworkshop.com/ros/two-wheeled-robot-project-using-ros/

 


   
THRandell reacted
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 318
Topic starter  

@robotbuilder 

Thanks for the links.  Not real familiar with github beyond following instructions when downloading a library.

 


   
ReplyQuote
robotBuilder
(@robotbuilder)
Member
Joined: 6 years ago
Posts: 2336
 

@huckohio 

The ros driver board look really good if you have a RPi5

https://category.yahboom.net/products/ros-driver-board

It is a matter I guess of searching for a ROS based fully explained tutorial on using it.

There must be talented people using it, the problem is how many post their projects online.

Maybe a board for @dronebot-workshop to review?

 

This post was modified 2 months ago 2 times by robotBuilder

   
huckOhio reacted
ReplyQuote
byron
(@byron)
No Title
Joined: 6 years ago
Posts: 1214
 

@huckohio 

I've not used ROS.  I remember thinking about using it in the early days of DroneBots where a some folk were having a go, but putting it on the rpi back then was not so easy and I seem to remember one chap failing to get it running.  To install ROS I think one had to install the ROS in place of the normal rpi OS though I could be mistaken. But in those days it was an rpi3 and I expect things have greatly improved since then.

I cant really make any useful comment on ROS courses except to suggest you check they cover the way you may wish to use your bot, so for example for my bot I would look to see it covers the use of GPS, imu sensors, camera sensors etc.  I think ROS is used with C++ so if your use of C++ has just been with using the Arduino environment then maybe a course to get fully up to speed with that before plunging into ROS would be a good idea.

I have seen some remarks that learning ROS is quite a steep learning curve.  For trundling a small bot around the premises I don't think that ROS offers much additional advantage to writing ones own robot control programs, but of course I voice that humble opinion with much ignorance of actually using ROS.   So I look forward to being enlightened from your experiences of learning ROS and seeing your bot's progress. 😀  

Edit: I just has a quick peruse on rpi and ROS and came across this link so I post the link in case its of any use for you.

This post was modified 2 months ago by byron

   
huckOhio reacted
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 318
Topic starter  

OK...another question.  Can anyone recommend a good C++ reference book?

I am taking a ROS2 class on Udemy and the course develops both Python and CPP examples.  I am following most of the python code, but the syntax of the CPP is very confusing.

For example the following is that last client node example in CPP.  

#include "rclcpp/rclcpp.hpp"
#include "example_interfaces/srv/add_two_ints.hpp"

using namespace std::chrono_literals;
using namespace std::placeholders;

class AddTwoIntsClientNode : public rclcpp::Node
{
public:
    AddTwoIntsClientNode() : Node("add_two_ints_client")
    {
        client_ = this->create_client<example_interfaces::srv::AddTwoInts>("add_two_ints");
    }

    void callAddTwoInts(int a, int b)
    {
        while (!client_->wait_for_service(1s))
        {
            RCLCPP_WARN(this->get_logger(), "Waiting for the server...");
        }

        auto request = std::make_shared<example_interfaces::srv::AddTwoInts::Request>();
        request->a = a;
        request->b = b;

        client_->async_send_request(
            request, std::bind(&AddTwoIntsClientNode::callbackCallAddTwoInts, this, _1));
    }

private:
    void callbackCallAddTwoInts(rclcpp::Client<example_interfaces::srv::AddTwoInts>::SharedFuture future)
    {
        auto response = future.get();
        RCLCPP_INFO(this->get_logger(), "Sum: %d", (int)response->sum);
    }


    rclcpp::Client<example_interfaces::srv::AddTwoInts>::SharedPtr client_;
};

int main(int argc, char **argv)
{
    rclcpp::init(argc, argv);
    auto node = std::make_shared<AddTwoIntsClientNode>();
    node->callAddTwoInts(10, 5);
    node->callAddTwoInts(12, 7);
    node->callAddTwoInts(1, 2);
    rclcpp::spin(node);
    rclcpp::shutdown();
    return 0;

I am looking for a reference book where I can try and understand the code.  For example:

using namespace std::placeholders;

what is a placeholder and how is it used?

RCLCPP_WARN(this->get_logger(), "Waiting for the server...");

what is "this->" mean/do?

auto request = std::make_shared<example_interfaces::srv::AddTwoInts::Request>();

What is "auto"?  What is "std::"?

I want to be able to look up these questions as I am running through the course.  I am partial to books, but a reference web site would also work.

I've looked at the C++ books on Amazon and they all look like step-by-step tutorials.  Or, is there a C++ website similar to the Arduino reference site I should use?

Thanks

Mike


   
ReplyQuote
TFMcCarthy
(@tfmccarthy)
Member
Joined: 10 months ago
Posts: 331
 

@huckohio 

I use the online reference all the time: https://en.cppreference.com/w/

I can also recommend "Programming Principles and Practice Using C++" by Stroustrup. It may seem like a tome but it's easy reading and well presented.

The one who has the most fun, wins!


   
huckOhio reacted
ReplyQuote
THRandell
(@thrandell)
Brain Donor
Joined: 4 years ago
Posts: 279
 

Posted by: @huckohio

what is a placeholder and how is it used?

I'm afraid you're going to find answers like this: https://en.cppreference.com/w/cpp/utility/functional/placeholders

I prefer to use books that build up my knowledge of a new language.  If you haven't used OO languages before you might want to try something like: "Accelerated C++" by Koenig & Moo.

If you want a jump start into the world of programming a robot check out "Robot Programming" by Jones.  Joe Jones was one of the first Roomba programmers back in the day.

 

Tom

To err is human.
To really foul up, use a computer.


   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 318
Topic starter  

@thrandell Thanks Tom, I'll look into the Robot Programming book


   
ReplyQuote
byron
(@byron)
No Title
Joined: 6 years ago
Posts: 1214
 

@huckohio 

Regarding namespaces in C++ you may find the following video of use.  I find that he explains things very well and probably worth a peruse in a tea break.  Unfortunately Ralf Bacon has not been posting over the last couple of years, and you will only find a sporadic video on various C++ topics in the list of stuff he was posting about.  But maybe its worth shifting through his videos as, from my perspective anyway, he provides very good explanations.  

But I see you have found examples of ROS using Python. And I ask myself 'what more can a man need 😎'. So just in case:

https://realpython.com/python-namespaces-scope/

This post was modified 1 month ago 2 times by byron

   
ReplyQuote
huckOhio
(@huckohio)
Member
Joined: 6 years ago
Posts: 318
Topic starter  

@byron Thank you.  I use to watch Ralph a while back.


   
ReplyQuote
Page 2 / 2