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

asked 2017-01-17 02:51:08 -0600

sonictl gravatar image

updated 2017-01-17 20:57:20 -0600

SimpleActionClient Can't connect to move_base server if rosbridge_websocket.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 my_node.py before launch the rosbridge_websocket.launch, everything will be ok. Thank you!!!


edit retag flag offensive close merge delete