ROS Topic query exercise 2.1

Hi RobotIginite Community Support,

I’m having issues executing this package (exercise_21) 's launch file ( move_robot.launch), please see the error in the attached screenshot,

move_robot.launch code:

<node pkg="exercise_21" type="move_robot.py" name="move_robot_node" output="screen" />

I already tried this command “source devel/setup.bash”

very scratching my head on what I missed, please help!

Thanks alot,

Kind Regards,
@wai.mak

@wai.mak
Make the file executable with
chmod +x fileNAME.py

1 Like

Hi @simon.steinmann91,

Thanks for getting back to be and please see below, I had already ran the command “chmod +x move_robot.py” , the error is still there,

Have I missed something else? …scratching my head the whole night and still not sure why…,

I also ran catkin_make and source devel/setup.bash from the catkin_ws directory, still same issue…

Thanks
@wai.mak

Hi @simon.steinmann91,

It is resolved now, thanks for trying to help out,

I realised I had an incorrect structure of the package, so glad I made the robot move,

Thanks
@wai.mak

1 Like

Hi @simon.steinmann91 and RobotIngnite Support:

Looking at the solution of this one,

I’m wondering how do you know what you can set in Twist() , how can we know what parameter we can set for say Twist().Linear.x or move.Linear.x (as in the screenshot)? how do I know/find out that .linear x or .angular.z…etc… is part of/behind Twist()… I still dont get it sorry…

Thank you for your help,

Kind Regards,
Roger

Hi @wai.mak,
In your future as a ROS developer, you will constantly have to look up the structure of messages. Just google the message type you are interested in. This is the documentation for geometry messages:
http://docs.ros.org/melodic/api/geometry_msgs/html/index-msg.html

Very usefull :slight_smile:

Hi @simon.steinmann91,

Ok I see now, I thought this could be looked up in ROS itself in Ubuntu, thought it was just some commands to look it up, so I will search in google for the messages structures then.

Thank you for your help,
Kind Regards
@wai.mak