Did I miss something for exercise 2.2 in Unit 3 of ROS basic in 5 days C++?

I was asked to:

  • Modify the code you used previously so that now it publishes data to the /cmd_vel topic.
    but I had not previously written any code to move the robot nor was I introduced to the Twist messages. I looked at the solution and understand what I was supposed to do, but I don’t feel as though the unit gave me enough information to do so (creating a new package to move the robot). Is it possible I missed something from the previous units?

Hi, I am also doing the ros basic in 5 days python and I was able to find the code in understanding ros topics and publishers, I think you can find the complete instructions there but I am not sure about the c++. In python course you will be able to see twist message like Twist(). Just have a look at that and you should understand it.

1 Like

Hey, thanks for the reply. I’ll take a look at the python version.
To anyone else wondering how to approach this problem, I was still able to learn a lot using info from the solution. I hadn’t used anything but std_msgs, so I tried to follow along reading the documentation here. By seeing how the messages were made here, I feel that I could now look up documentation on any message type and do something similar.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.