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

Vasu Agrawal's profile - activity

2018-03-29 16:47:50 -0600 received badge  Student (source)
2018-02-26 17:29:03 -0600 received badge  Famous Question (source)
2018-02-26 17:29:03 -0600 received badge  Notable Question (source)
2016-04-05 05:33:45 -0600 received badge  Popular Question (source)
2016-01-07 19:23:50 -0600 received badge  Famous Question (source)
2015-08-27 20:41:13 -0600 received badge  Notable Question (source)
2015-08-06 06:25:11 -0600 asked a question Roslaunch using different port?

I'm attempting to use roslaunch to start nodes on 2 different machines. Apparently roslaunch will create it's own ssh connection - I have my network configured so that I use public / private keys for authentication, but I've set the ssh to be done over a different port. How would I configure my roslaunch file to do the same? (i.e. port 42 instead of 22)

Current file:

  <machine name="bbb" address="bbb -p 4242" user="sparky"/>
  <machine name="spearmint" address="localhost" default="true" />

Obviously that's the wrong syntax, but that's what I'm trying to achieve.

For reference, I can run ssh sparky@bbb -p 4242 and connect just fine.

2015-07-17 09:32:51 -0600 received badge  Popular Question (source)
2015-06-30 19:40:54 -0600 received badge  Supporter (source)
2015-06-30 19:40:53 -0600 received badge  Scholar (source)
2015-06-30 19:40:51 -0600 commented answer rospy module init_node fails?

This seemed to be part of the issue. I was having some trouble after I renamed the file to something else, only to discover that running the other file for some reason ran the .pyc instead (I'd love to know why). However, deleting the .pyc and changing the file name works. Thank you!

2015-06-30 11:10:52 -0600 received badge  Editor (source)
2015-06-30 11:10:24 -0600 commented question rospy module init_node fails?

Ah, sorry. Edited post with additional info.

2015-06-29 22:43:09 -0600 asked a question rospy module init_node fails?

I'm attempting to write a simple python node, but I can't even seem to get rospy imported into my script. Even just the import statement (after running chmod +x [filename]) fails. I'm unable to run the tutorial python nodes as well. What are the possible reasons why this could be happening? I've been able to get a node running just fine on C++.

My (snipped) code, for reference:

#!/usr/bin/env python
import rospy

def main():


And the full error text:

rosrun SCARA_test_1
Traceback (most recent call last):
  File "/home/mint/Documents/catkin_ws/src/SCARA_test_1/scripts/", line 3, in <module>
    import rospy
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/", line 46, in <module>
    import random
  File "/home/mint/Documents/catkin_ws/src/SCARA_test_1/scripts/", line 34, in <module>
  File "/home/mint/Documents/catkin_ws/src/SCARA_test_1/scripts/", line 30, in main
AttributeError: 'module' object has no attribute 'init_node'

EDIT: Additional system info:

OS: Linux Mint 17.1 (Based on ubuntu 14.04)

ROS: Indigo

PYTHONPATH: /home/mint/Documents/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/indigo/lib/python2.7/dist-packages