jchengai / gpir

[ICRA'22] Real-Time Trajectory Planning for Autonomous Driving with Gaussian Process and Incremental Refinement
https://arxiv.org/pdf/2205.11853.pdf
MIT License
215 stars 50 forks source link

Unable to launch roslaunch planning_core planning.launch successfully #7

Closed saxenam06 closed 1 year ago

saxenam06 commented 1 year ago

Hi, Many Thanks for open sourcing great work. I have couple of indicators which I am unable to solve after a lot of time spent. could you please help if you have any ideas.

  1. When I do catkin_make -DCMAKE_BUILD_TYPE=RELEASE -j4 then I am getting following error. I am wondering why when the opencv-python is successfully installed. fatal error: opencv2/core/core.hpp: No such file or directory 15 | #include <opencv2/core/core.hpp>
  2. Though I have the rosbridge setup, but when I do roslaunch planning_core planning.launch I dont see any lane lines or other cars except ego vehicle and that too stationary. Could you please help me with some hints.

for your reference below output from roslaunch planning_core planning.launch: carla-ros-bridge/catkin_ws$ roslaunch planning_core planning.launch ... logging to /home/manasvi/.ros/log/b47813ce-4265-11ed-b005-5fb570d486ce/roslaunch-manasvi-PC-3628.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

xacro: in-order processing became default in ROS Melodic. You can drop the option. started roslaunch server http://manasvi-PC:35483/

SUMMARY

PARAMETERS

NODES / carla_controller (planning_core/carla_controller) planning (planning_core/planning) planning_rviz (rviz/rviz) vehicle (robot_state_publisher/robot_state_publisher)

ROS_MASTER_URI=http://localhost:11311

ERROR: cannot launch node of type [planning_core/planning]: Cannot locate node of type [planning] in package [planning_core]. Make sure file exists in package path and permission is set to executable (chmod +x) process[carla_controller-2]: started with pid [3651] process[planning_rviz-3]: started with pid [3652] process[vehicle-4]: started with pid [3654]

output from roslaunch planning_core carla_setup.launch ... logging to /home/manasvi/.ros/log/b47813ce-4265-11ed-b005-5fb570d486ce/roslaunch-manasvi-PC-3317.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://manasvi-PC:36051/

SUMMARY

PARAMETERS

NODES / carla_manual_control_ego_vehicle (carla_manual_control/carla_manual_control.py) carla_ros_bridge (carla_ros_bridge/bridge.py) carla_spawn_objects_manasvi_PC_3317_8527585904025881905 (carla_spawn_objects/carla_spawn_objects.py) carla_tf (planning_core/carla_tf) set_initial_pose_ego_vehicle (carla_spawn_objects/set_initial_pose.py)

auto-starting new master process[master]: started with pid [3332] ROS_MASTER_URI=http://localhost:11311

setting /run_id to b47813ce-4265-11ed-b005-5fb570d486ce process[rosout-1]: started with pid [3349] started core service [/rosout] process[carla_ros_bridge-2]: started with pid [3357] process[carla_spawn_objects_manasvi_PC_3317_8527585904025881905-3]: started with pid [3358] process[set_initial_pose_ego_vehicle-4]: started with pid [3359] process[carla_manual_control_ego_vehicle-5]: started with pid [3360] process[carla_tf-6]: started with pid [3361] pygame 2.1.2 (SDL 2.0.16, Python 3.7.13) Hello from the pygame community. https://www.pygame.org/contribute.html [INFO] [1664724013.756730, 0.000000]: Trying to connect to localhost:2000 [INFO] [1664724013.761823, 0.000000]: Loading opendrive world from file '/home/manasvi/carla-ros-bridge/catkin_ws/src/gpir/hdmap/maps/opendrive/Town05.xodr' [INFO] [1664724016.554498, 0.000000]: synchronous_mode: True [INFO] [1664724016.556426, 0.000000]: fixed_delta_seconds: 0.02

[INFO] [1664724016.629431, 0.000000]: host: localhost [INFO] [1664724016.631720, 0.000000]: port: 2000 [INFO] [1664724016.633436, 0.000000]: timeout: 10

[INFO] [1664724016.638046, 0.000000]: synchronous_mode: True [INFO] [1664724016.642200, 0.000000]: synchronous_mode_wait_for_vehicle_control_command: False [INFO] [1664724016.644830, 0.000000]: fixed_delta_seconds: 0.02 [INFO] [1664724016.648138, 0.000000]: register_all_sensors: True [INFO] [1664724016.651010, 0.000000]: town: /home/manasvi/carla-ros-bridge/catkin_ws/src/gpir/hdmap/maps/opendrive/Town05.xodr [INFO] [1664724016.654036, 0.000000]: ego_vehicle: {'role_name': '["hero", "ego_vehicle", "hero0", "hero1", "hero2", "hero3", "hero4", "hero5", "hero6", "hero7", "hero8", "hero9"]'} [INFO] [1664724017.238757, 0.000000]: Created Spectator(id=150) [ ..... [INFO] [1664724017.366481, 0.000000]: Object (type='sensor.pseudo.traffic_lights', id='traffic_lights') spawned successfully as 10000. [INFO] [1664724017.367463, 0.000000]: Created TrafficLight(id=184) [INFO] [1664724017.368878, 0.000000]: Created TrafficLight(id=185) [INFO] [1664724017.370593, 0.000000]: Object (type='sensor.pseudo.objects', id='objects') spawned successfully as 10001. [INFO] [1664724017.370785, 0.000000]: Created TrafficLight(id=186) [INFO] [1664724017.372992, 0.000000]: Created TrafficLight(id=187) [INFO] [1664724017.375771, 0.000000]: Created TrafficLight(id=188) [INFO] [1664724017.376672, 0.000000]: Object (type='sensor.pseudo.actor_list', id='actor_list') spawned successfully as 10002. [INFO] [1664724017.378023, 0.000000]: Created TrafficLight(id=189) [INFO] [1664724017.380032, 0.000000]: Created TrafficLight(id=190) [INFO] [1664724017.381251, 0.000000]: Object (type='sensor.pseudo.markers', id='markers') spawned successfully as 10003. [INFO] [1664724017.384470, 0.000000]: Spawn point from ros parameters [INFO] [1664724017.390499, 0.000000]: Created TrafficLight(id=191) [INFO] [1664724017.393760, 0.000000]: Created TrafficLight(id=192) [INFO] [1664724017.395912, 0.000000]: Created TrafficLight(id=193) [INFO] [1664724017.398227, 0.000000]: Created TrafficLight(id=194) [INFO] [1664724017.399329, 0.000000]: Object (type='vehicle.tesla.model3', id='ego_vehicle') spawned successfully as 210. [INFO] [1664724017.401632, 0.000000]: Created TrafficLight(id=195) [INFO] [1664724017.403616, 0.000000]: Created TrafficLight(id=196) [INFO] [1664724017.405358, 0.000000]: Created TrafficLight(id=197) [INFO] [1664724017.407894, 0.000000]: Created TrafficLight(id=198) [INFO] [1664724017.410006, 0.000000]: Created TrafficLight(id=199) [INFO] [1664724017.411203, 0.000000]: Object (type='sensor.camera.rgb', id='rgb_view') spawned successfully as 211. [INFO] [1664724017.435630, 0.000000]: Created TrafficLight(id=209) [INFO] [1664724017.440400, 0.000000]: Object (type='sensor.other.lane_invasion', id='lane_invasion') spawned successfully as 213. [INFO] [1664724017.442550, 0.000000]: Created TrafficLightsSensor(id=10000) [INFO] [1664724017.445724, 0.000000]: Created ObjectSensor(id=10001) [INFO] [1664724017.448721, 0.000000]: Created ActorListSensor(id=10002) [INFO] [1664724017.475168, 0.000000]: Created MarkerSensor(id=10003) [INFO] [1664724017.489951, 0.000000]: Created EgoVehicle(id=210) [INFO] [1664724017.512054, 0.000000]: Created RgbCamera(id=211) [INFO] [1664724017.526733, 0.000000]: Created ActorControl(id=10004) [INFO] [1664724017.557877, 0.000000]: Created CollisionSensor(id=212) [INFO] [1664724017.836328, 0.000000]: Created LaneInvasionSensor(id=213) [INFO] [1664724017.838608, 0.000000]: Object (type='sensor.pseudo.tf', id='tf') spawned successfully as 10005. [INFO] [1664724017.843218, 0.000000]: Object (type='sensor.pseudo.odom', id='odometry') spawned successfully as 10006. [INFO] [1664724017.845052, 0.000000]: All objects spawned. [INFO] [1664724017.950256, 2.287129]: Created TFSensor(id=10005) [INFO] [1664724017.957978, 2.287129]: Created OdometrySensor(id=10006)

jchengai commented 1 year ago

Hi, thank you for being interested in our work

  1. The opencv error may be fixed by sudo apt install libopencv-dev.

  2. The error message

ERROR: cannot launch node of type [planning_core/planning]: Cannot locate node of type [planning] in package [planning_core].

seems indicating that the planning_core node is not successfully built. Can you have a try to rebuild the project after solving the opencv error?

saxenam06 commented 1 year ago

Thanks a lot for your direction. Yes, now I am able to make opencv work. Issue was the path because of which it was not recognizing opencv2. I did this which resolved the opencv2 issue. sudo ln -s /usr/local/include/opencv4/opencv2/ /usr/local/include/opencv2

i rebuild it now but I am getting the below issue. Trying to find the way from here now! Many Thanks.

started roslaunch server http://manasvi-PC:40083/

SUMMARY

PARAMETERS

NODES / carla_controller (planning_core/carla_controller) planning (planning_core/planning) planning_rviz (rviz/rviz) vehicle (robot_state_publisher/robot_state_publisher)

ROS_MASTER_URI=http://localhost:11311

process[planning-1]: started with pid [40977] process[carla_controller-2]: started with pid [40978] process[planning_rviz-3]: started with pid [40979] process[vehicle-4]: started with pid [40980] [pcl::PCDReader::read] Could not find file '/home/manasvi/carla-ros-bridge/catkin_ws/src/gpir/hdmap/maps/pcd/Town05.pcd'. Fail to load pcd file: /home/manasvi/carla-ros-bridge/catkin_ws/src/gpir/hdmap/maps/pcd/Town05.pcd W1003 13:33:58.037207 40977 carla_ego_info.cc:87] cannot receive ego info from carla W1003 13:33:58.038964 40977 carla_adapter.cc:40] fail to get vehicle param from Carla, Retry: 0 I1003 13:34:00.040946 40977 carla_adapter.cc:37] length: 4.79178 width: 2.16345 height: 1.48832 wheel_base: 3.00465 front_to_front_axle: 0.777641 back_to_rear_axle: 1.00949 rear_axle_to_center: 1.3864 I1003 13:34:00.041018 40977 planning_core.cc:45] Init simulator Carla OK W1003 13:34:00.255278 41075 mpc_controller.cc:68] trajectory is empty W1003 13:34:03.184638 41076 mpc_controller.cc:68] trajectory is empty W1003 13:34:06.344964 41075 mpc_controller.cc:68] trajectory is empty

jchengai commented 1 year ago

Please follow these steps to a run a demo (as this part in readme):

  1. launch the control console GUI by roslaunch planning_core keyboard.launch
  2. Create a demo scenario by press key "E"
  3. Run the simulatoin by press key "B"
saxenam06 commented 1 year ago

yes it works. Many Thanks for your quick response.