Hi @joseecm ,
To simply describe,
arguments: these are the values that you provide to a function when you call that function.
parameters: these are the values that you provide to a function when the function is declared in the program
Example for Parameters:
# Python
def function(a: int, b: float, c: chr) # a, b, c are parameters
d = a * b * ord(c)
return d
// C++
double function(int a, float b, char c) // a, b, c are parameters
{
double d = (double)(a * b * int(c));
return d;
}
Example for Arguments:
# Python:
if __name__ == "__main__":
res = function(a=1, b=3.14159, c='x') # 1, 3.14159, 'x' are arguments
// C++
int main(int argc, char** argv) {
double res;
res = function(1, 3.14159, 'x') // 1, 3.14159, 'x' are arguments
return 0;
}
So, within a launch file in your case, when you define arguments, you are actually providing values to the functions that use the keyword parameter.
Example:
arguments=["-resolution", 0.01,
"-keyword1", value1,
"-keyword2", value2]
# function parameters are {resolution, keyword1, keyword2}
# and
# function arguments are {0.01, value1, value2}
# you are NOT setting parameters - these keywords are already set
# you are setting the arguments - these are values that you set
# hence you define arguments=[...] (and not parameters=[...])
I hope this clarifies your doubts.
Regards,
Girish