ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.01k stars 9.67k forks source link

Error in running V2X, /sunnyvale_big_loop does not exist. #11399

Closed RezaMehrabian closed 4 years ago

RezaMehrabian commented 4 years ago

I run the LGSV simulator along with apollo. Then I launch V2X module by the command below:

cyber_launch start modules/v2x/launch/v2x.launch

Then I receive the error below. I think "sunnyvale_big_loop/base_map.bin" does not exist. How I can find it?

[/apollo/bazel-bin/modules/v2x/v2x --flagfile=/apollo/modules/v2x/conf/v2x.conf] E0606 00:36:23.831930 13036 file.cc:73] [v2x] Failed to open file /apollo/modu les/map/data/demo/base_map.bin|base_map.xml|base_map.txt in text mode. [/apollo/bazel-bin/modules/v2x/v2x --flagfile=/apollo/modules/v2x/conf/v2x.conf] E0606 00:36:23.831982 13036 file.cc:99] [v2x] Failed to open file /apollo/modu les/map/data/demo/base_map.bin|base_map.xml|base_map.txt in binary mode. [/apollo/bazel-bin/modules/v2x/v2x --flagfile=/apollo/modules/v2x/conf/v2x.conf] F0606 00:36:23.831998 13036 v2x_proxy.cc:65] [v2x] Failed to load hadmap file: /apollo/modules/map/data/sunnyvale_big_loop/base_map.bin [/apollo/bazel-bin/modules/v2x/v2x --flagfile=/apollo/modules/v2x/conf/v2x.conf]

daohu527 commented 4 years ago

There're two problems you need to deal with.

  1. You need to modify the map of the v2x module to the map you choices in dreamview.
    DEFINE_string(hdmap_file_name,
              "/apollo/modules/map/data/sunnyvale_big_loop/base_map.bin",
              "hdmap file name");
  2. The v2x module requires grpc service to provide traffic signal information and obstacle information.
RezaMehrabian commented 4 years ago

Thank you @daohu527 I use cubetown map. Is the following line correct?

DEFINE_string(hdmap_file_name, "/apollo/modules/map/data/cubetown/base_map.bin", "hdmap file name");

I know how to prepare the grpc part. The only question is about the IPs and ports. if I keep the following line the same, can I have the communication in one single vehicle?

DEFINE_string(grpc_client_host, "127.0.0.1", "grpc client host ip"); DEFINE_string(grpc_server_host, "127.0.0.1", "grpc server host ip"); DEFINE_string(grpc_client_port, "50100", "grpc client port num"); DEFINE_string(grpc_server_port, "50101", "grpc server port num");

If I want to have two different vehicles, how can I modify them? If the IP for the server is 192.168.1.5 and the client is 192.168.1.6, the following code is right? What more I need to complete the work (except the grpc part)?

Server: DEFINE_string(grpc_client_host, "192.168.1.6", "grpc client host ip"); DEFINE_string(grpc_server_host, "192.168.1.5", "grpc server host ip"); DEFINE_string(grpc_client_port, "50100", "grpc client port num"); DEFINE_string(grpc_server_port, "50101", "grpc server port num");

Client: DEFINE_string(grpc_client_host, "192.168.1.5", "grpc client host ip"); DEFINE_string(grpc_server_host, "192.168.1.6", "grpc server host ip"); DEFINE_string(grpc_client_port, "50101", "grpc client port num"); DEFINE_string(grpc_server_port, "50100", "grpc server port num");

Thank you,

daohu527 commented 4 years ago

@Martin20 If you want to change the v2x server and client, just modify the configuration in "apollo\modules\v2x\conf\v2x.conf"

  1. Client and server both in local vehicle In addition to starting apollo, you need to start another grpc client and server. the client is used to publish traffic signal information, and the server is used to receive the vehicle status.

    Apollo grpc client  ---- >  grpc server  Another thread
        grpc server <----- grpc client
  2. Client in local vehicle, and server in another device local vehicle ( IP 192.168.1.5)

    --debug_flag=false
    --x2v_trafficlight_timer_frequency=10
    --v2x_carstatus_timer_frequency=10
    --grpc_client_host=192.168.1.6   // the IP address of another device
    --grpc_client_port=50100
    --grpc_server_host=192.168.1.5  // local vehicle's IP address
    --grpc_server_port=50101

    another device (IP 192.168.1.6)

    --debug_flag=false
    --x2v_trafficlight_timer_frequency=10
    --v2x_carstatus_timer_frequency=10
    --grpc_client_host=192.168.1.5   // local device's IP address
    --grpc_client_port=50101
    --grpc_server_host=192.168.1.6  //  the IP address of the vehicle 
    --grpc_server_port=50100
RezaMehrabian commented 4 years ago

Thanks @daohu527

RezaMehrabian commented 4 years ago

Hello @daohu527 ,

Thank you for your respond. I run the simulator and launch v2x by "v2x.launch". Howvere, I received the following error. Do you have any clue?

[/apollo/bazel-bin/modules/v2x/v2x --flagfile=/apollo/modules/v2x/conf/v2x.conf] /apollo/bazel-bin/modules/v2x/v2x: error while loading shared libraries: libfastcdr.so.1: cannot open shared object file: No such file or directory

daohu527 commented 4 years ago

Hi @Martin20

Seems can't find libfastcdr, I found some previous issues, you can refer to link

If it can't solve the problem, you can open a new one.