ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

I want to write a python code based code to call a ros node ,where to begin?

asked 2016-10-22 17:06:51 -0500

Abdullah gravatar image

updated 2016-10-22 17:23:01 -0500

I wish to write a code for a node that could do the following for me

1) run a node with an argument 2) do a rosservice call

Basically I want to be able to do what a launch file does, in a python code Where should I begin? I mean is there any tutorial or rospy code that could help me begin with?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-10-22 17:55:02 -0500

JoshMarino gravatar image

updated 2016-10-22 17:57:24 -0500

This should cover both tasks.

edit flag offensive delete link more


Thank you JoshMarino, but it seems like I have to write a code for the client. but it seems like the server node should be running already for the client code to call it via waitforservice thing.

I mean how to run a node from scratch, i mean not initiate a node, or become a node, but launching it

Abdullah gravatar image Abdullah  ( 2016-10-22 18:14:11 -0500 )edit

You can either include starting a node in a launch file, or start one with rosrun from the command line.

JoshMarino gravatar image JoshMarino  ( 2016-10-22 21:07:56 -0500 )edit

Question Tools

1 follower


Asked: 2016-10-22 17:06:51 -0500

Seen: 484 times

Last updated: Oct 22 '16