Unable to connect subscriber to publisher [http://in_dev_docker:41833/] for topic [/apollo/perception/obstacles]: unable to requestTopic: [Errno 111] Connection refused
Hi,
I wrote a simple python tool to see the perception data (code below), basically, I subscribe to /apollo/perception/obstacles and print out the data
It works well when I play a rosbag, it display the perception data as I wanted. But when not running a rosbag, and I turn on the perception module, I get this error
Unable to connect subscriber to publisher [http://in_dev_docker:41833/] for topic [/apollo/perception/obstacles]: unable to requestTopic: [Errno 111] Connection refused
#!/usr/bin/env python
import rospy
from std_msgs.msg import String
import threading
import numpy as np
from modules.perception.proto import perception_obstacle_pb2
def callback(data):
print data
print '-----------------'
def listener():
rospy.init_node('perception_sub', anonymous=True)
rospy.Subscriber('/apollo/perception/obstacles',perception_obstacle_pb2.PerceptionObstacles, callback)
rospy.spin()
if __name__ == '__main__':
listener()
#4338 part of this request
Without running the python script, do you get any results from running:
rostopic echo /apollo/perception/obstacles
Same here. I got the same error output when I try to play a bag and echo some topic. I got the msg:
/use_sim_time is not set, will not subscribe to simulated time [/clock] topic
And I tried to set use_sim_time as true. Then I got the same error msg as:
[ERROR] [WallTime: 1529551855.971586] [0.000000] Unable to connect subscriber to publisher [http://in_dev_docker:39765/] for topic [/clock]: unable to requestTopic: [Errno 111] Connection refused
I don't know why. Right now I cannot echo any topic ... @unacao