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 -0500 received badge  Student (source)
2018-02-26 17:29:03 -0500 received badge  Famous Question (source)
2018-02-26 17:29:03 -0500 received badge  Notable Question (source)
2016-04-05 05:33:45 -0500 received badge  Popular Question (source)
2016-01-07 19:23:50 -0500 received badge  Famous Question (source)
2015-08-27 20:41:13 -0500 received badge  Notable Question (source)
2015-08-06 06:25:11 -0500 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:

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

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 -0500 received badge  Popular Question (source)
2015-06-30 19:40:54 -0500 received badge  Supporter (source)
2015-06-30 19:40:53 -0500 received badge  Scholar (source)
2015-06-30 19:40:51 -0500 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 -0500 received badge  Editor (source)
2015-06-30 11:10:24 -0500 commented question rospy module init_node fails?

Ah, sorry. Edited post with additional info.

2015-06-29 22:43:09 -0500 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():
    rospy.init_node("arm_gui")

main()

And the full error text:

rosrun SCARA_test_1 random.py
Traceback (most recent call last):
  File "/home/mint/Documents/catkin_ws/src/SCARA_test_1/scripts/random.py", line 3, in <module>
    import rospy
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/__init__.py", line 49, in <module>
    from .client import spin, myargv, init_node, \
  File "/opt/ros/indigo/lib/python2.7/dist-packages/rospy/client.py", line 46, in <module>
    import random
  File "/home/mint/Documents/catkin_ws/src/SCARA_test_1/scripts/random.py", line 34, in <module>
    main()
  File "/home/mint/Documents/catkin_ws/src/SCARA_test_1/scripts/random.py", line 30, in main
    rospy.init_node("arm_gui")
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