Robotics StackExchange | Archived questions

To start a node without rosrun or roslaunch in different IDEs

I am looking for a scenario where while using pycharm, initializing a python class by its own also initializes that class within a ros node. Something like this:

class module(object):
    def __init__(self):
        some_other_stuff()
        rospy.init_node('node_1')
        rospy.spin()
    def ........

and then I want to import this module in other scripts also.

Asked by azerila on 2020-04-15 06:26:44 UTC

Comments

This reads like a duplicate / condensed version of #q349467. If that is the case, could I ask you to please not post duplicates?

Asked by gvdhoorn on 2020-04-15 06:43:41 UTC

Answers