Robotics StackExchange | Archived questions

SimpleActionClient Can't connect to move_base server if rosbridge_websocket.launch launched.

SimpleActionClient Can't connect to movebase server if rosbridgewebsocket.launch launched.

$ sudo apt-get install ros-inidigo-rosbridge-server
$ roslaunch rosbridge_server rosbridge_websocket.launch port:=8080
$ ./my_node.py

code for my_node.py:

self.moveClient = actionlib.SimpleActionClient("move_base", MoveBaseAction)
self.moveClient.wait_for_server(rospy.Duration(60))  #Can't connect to server, program will wait at here for 60 secs.
self.goal = MoveBaseGoal()
 ... #envalue the self.goal
self.moveClient.send_goal(self.goal)  #This will not work. robot doesn't move.

if I start the mynode.py before launch the rosbridgewebsocket.launch, everything will be ok. Thank you!!!


Asked by sonictl on 2017-01-17 03:51:08 UTC

Comments

Answers