Exercise 1.2 "param"

When I type in rosbot.get_position(1); it automatically inserts “param” like "rosbot.get_position(param: 1); The code worked, but I’m trying to understand why it does this?

I’m also unclear what the numbers in the ROS_INFO_STREAM mean?

Hi @scharine0508 ,

Could you explain the problem more particularly?
Which course are you taking and get this problem?
I cannot find any Exercise 1.2 in the “Linux for Robotics” course.
If you provide more detailed information, the community might be able to help you.

Tung Ngo

Hi !

Please donot worry about the argument “Param”. We are using Vscode as the IDE and it is showing the required input arguments.

The funtion in Vscode comes in handy when you are doing object oriented programming or functional programming. It show what are the required input arguments for the function you want to use.

for example :slight_smile:

You are using a class rosbot and it has a function “get position”, this get position function reqiures a input argument called “param”.

It can also be a good exercise to open the rosbot source code and navigate to the “get position”, function to see the required input arguments.

Please donot worry if you donot understand what i mean yet. You will definitely understand when you will complete the course ROS with python.

ROS_INFO_STREAM is a funtion that is used to print output on the output terminal. It is also explained in detailed in the courses ROS basics with python or ROS basics with c++ in the Debug chapter.

Please feel free to ask if you donot understand.

Best regards,
Muhammad Junaid

1 Like

Sorry Tung, I’m taking the C++ for Robotics course. Thanks Muhammad. I’ll keep going and see if it gets a bit clearer.

1 Like

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