carla-simulator / data-collector

Data collector for version 0.8.4, also contains an client side agent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

is the data collector backward compatible?

YaduKini opened this issue · comments

I have Carla server version 0.8.2 running in my system. Will this data collector work with Carla version 0.8.2? is there any chance of this happening? Please let me know as it will really help me in my research. Thanks.

Yes it will work for sure. Maybe you will have to recalibrate a bit the PID parameters Here:
https://github.com/carla-simulator/data-collector/blob/master/carla/agent/command_follower.py
But it probably wont be a problem.

Hi Felipecode,

I am currently running Carla 0.8.2 in autopilot mode and I ran the data collector. But, it is failing to read the data. I'm getting the error shown below after running collect.py:
ERROR************
pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
INFO: listening to server localhost:2000
ERROR: (localhost:2000) failed to read data: timed out
ERROR: (localhost:2000) failed to read data: timed out
ERROR: (localhost:2000) failed to read data: timed out
.
.


Is the version mismatch a possible cause? or it purely a network related issue? I haven't been able to figure out. Could you please help me?

Can you tell me exactly the steps you did to execute ?
What do you mean by running Carla 0.8.2 in autopilot mode ? The autopilot is controlled on the client side.

I installed Carla 0.8.2 and the data collector module for 0.8.4 Carla and ran the command shown below:

sh CarlaUE4.sh /Game/Maps/Town01 -windowed -ResX=720 -ResY=480 -carla-server -world-port=2000

Then I ran the client, with the command shown below:

roslaunch carla_ros_bridge client_with_rviz.launch

sorry if I got the term wrong. By autopilot, I meant that I am not controlling Carla. It's moving around the map on it's own.

Then I ran the data collector in the conda environment:

python collect.py

and I get this error below:

pygame 1.9.4
Hello from the pygame community. https://www.pygame.org/contribute.html
INFO: listening to server localhost:2000
ERROR: (localhost:2000) failed to read data: timed out
ERROR: (localhost:2000) failed to read data: timed out
ERROR: (localhost:2000) failed to read data: timed out

Please help.

When I run the above steps without running client_with_rviz, some data is being stored in _output_logs directory. But they seem to be empty. The _output_logs directory looks something like this:

collect_12675_0.out collect_31929_0.out collect_5169_0.out err_collect_19198_0.out err_collect_5140_0.out
collect_15752_0.out collect_4268_0.out collect_9154_0.out err_collect_30860_0.out err_collect_5155_0.out
collect_19198_0.out collect_5140_0.out err_collect_12675_0.out err_collect_31929_0.out err_collect_5169_0.out
collect_30860_0.out collect_5155_0.out err_collect_15752_0.out err_collect_4268_0.out err_collect_9154_0.out

Can you tell me what is inside the error logs ?
Another thing. Maybe the port 2000 is busy. I think that maybe the ros client is already using the port.
When you collect without the RVIZ does it generate data on the main folder ?

The file collect_12675_0.out contains the data: Cancelled by user. Bye!
err_collect_12675_0.out has nothing inside it.
When I collect the data without RVIZ, No data is being generated on the main folder.
the collect.out and err_collect.out log files are being generated everytime. The collect.out file has Cancelled by user. Bye! and the err_collect.out file has no data in it. This happens everytime I run the data collector.
I see that the carla server, the client and also the data collector operate over port 2000 by default. Is there any way I can run these on any other port?

Hi @felipecode,

When I tried with other ports, I'm getting an error saying connection refused after I run collect.py. Is there any other way to run the data collector?

Hi @felipecode ,

I got the following error in err_collect.out afetr running collect.py


Traceback (most recent call last):
File "./collect.py", line 484, in
main()
File "./collect.py", line 473, in main
collect(client, args)
File "./collect.py", line 231, in collect
settings_module, args.debug)
File "./collect.py", line 158, in reset_episode
carla_game.initialize_game(town_name, render_mode=show_render)
File "/home/hitech/carla/carla_data_collector/data-collector/carla_game/carla_game.py", line 90, in initialize_game
self._map = CarlaMap(map_name, 0.1643, 50.0)
File "/home/hitech/carla/carla_data_collector/data-collector/carla/planner/map.py", line 44, in init
self._graph = Graph(city_file, node_density)
File "/home/hitech/carla/carla_data_collector/data-collector/carla/planner/graph.py", line 44, in init
with open(graph_file, 'r') as f:
FileNotFoundError: [Errno 2] No such file or directory: '/home/hitech/carla/carla_data_collector/data-collector/carla/planner/.txt'


looks like the map name is not getting parsed. I ran the command as mentioned in the readme file of the carala data collector. Could you help me figure out what the problem is?

I know ! I am sorry, now I realize it is not really compatible.
The problem is that CARLA 0.8.2 does not send the map name to the client.
So it does not know in which town are you in.
Either try to use 0.8.4 ( There is no much difference really)
or hardcode the town name. Go to line 158 from collect.py and set the Town name that you are using
before initializing carla_game.

 town_name = 'Town01'

Cheers

Thanks a ton, got it! :)