ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.29k stars 9.73k forks source link

Can't run perception_lowcost.sh #4994

Closed vladpaunescu closed 4 years ago

vladpaunescu commented 6 years ago

I have a problem with running the simulator with only image data. It complains about

E0716 19:03:37.176589 29053 lane_post_processing_subnode.cc:154] failed to get shared data. event:event_id: 0 timestamp: 0.000000000 reserve: 
E0716 19:03:37.176601 29053 lane_post_processing_subnode.cc:196] Failed to get shared data. event:event_id: 0 timestamp: 0.000000000 reserve: 

It seems camera_object_data_->Get(data_key, objs) is NULL.

According to readme at https://github.com/ApolloAuto/apollo/tree/master/modules/perception perception modules should publish at rostopic echo /apollo/perception/obstacles

When running ./scripts/perception.sh everyting is ok. rostopic echo /apollo/perception/obstacles receives data. When running ./scripts/perception_lowcost.sh nothins is shown in dreamview, or rostopic echo /apollo/perception/obstacles.

Any ideas? We want camera only detection, no lidar involved.

Upade:

One possible problem is that when I play this bag:

rosbag play demo-sensor-data-apollo-2.0/2018-01-03-19-37-16.bag

It doesn't publish data to

rostopic echo /apollo/sensor/camera/obstacle/front_6mm

In fact, rostopics the bag has are:

rosbag info demo-sensor-data-apollo-2.0/2018-01-03-19-37-16.bag

topics:      /apollo/canbus/chassis                               5851 msgs    : pb_msgs/Chassis             
             /apollo/localization/pose                            5856 msgs    : pb_msgs/LocalizationEstimate
             /apollo/sensor/camera/traffic/image_long              471 msgs    : sensor_msgs/Image           
             /apollo/sensor/camera/traffic/image_short             469 msgs    : sensor_msgs/Image           
             /apollo/sensor/conti_radar                            789 msgs    : pb_msgs/ContiRadar          
             /apollo/sensor/gnss/best_pose                          59 msgs    : pb_msgs/GnssBestPose        
             /apollo/sensor/gnss/corrected_imu                    5838 msgs    : pb_msgs/Imu                 
             /apollo/sensor/gnss/gnss_status                        59 msgs    : pb_msgs/GnssStatus          
             /apollo/sensor/gnss/imu                             11630 msgs    : pb_msgs/Imu                 
             /apollo/sensor/gnss/ins_stat                          118 msgs    : pb_msgs/InsStat             
             /apollo/sensor/gnss/odometry                         5848 msgs    : pb_msgs/Gps                 
             /apollo/sensor/gnss/rtk_eph                            49 msgs    : pb_msgs/GnssEphemeris       
             /apollo/sensor/gnss/rtk_obs                           352 msgs    : pb_msgs/EpochObservation    
             /apollo/sensor/velodyne64/compensator/PointCloud2     587 msgs    : sensor_msgs/PointCloud2     
             /tf                                                 11740 msgs    : tf2_msgs/TFMessage          
             /tf_static                                              1 msg     : tf2_msgs/TFMessage

From pereception doc:

The perception module inputs are:

Radar data (ROS topic /apollo/sensor/conti_radar) Image data (ROS topic /apollo/sensor/camera/obstacle/front_6mm)

I tried to modify: /apollo/modules/perception/data/params/start_obstacle_camera.launch

<launch>
  <arg name="front_obstacle_6mm_topic_name" default="/apollo/sensor/camera/obstacle/front_6mm" />
  <arg name="frame_rate" default="30"/>

to

<launch>
  <arg name="front_obstacle_6mm_topic_name" default="/apollo/sensor/camera/traffic/image_long" />
  <arg name="frame_rate" default="30"/>

But it doesn't work.

Many thanks! Vlad

snuffysasa commented 6 years ago

You should be able to download demo_2.5.bag

vladpaunescu commented 6 years ago

Thank you so much!

Steps followed:

rosbag info demo_2.5.bag
./scripts/perception_lowcost.sh start
rosbag play demo_2.5_cam.bag  --loop

Got image data, and detection in:

rostopic echo /apollo/perception/obstacles
rostopic echo /apollo/sensor/camera/front_6mm

Unfortunately Dreamview output looks empty - no image, no map, no lane lines. However, PerceptionObstacle module is responding (small delay).

Unfortunately rostopic echo /apollo/perception/obstacles shows no lane marker when running ./scripts/perception_lowcost.sh :

header {
  timestamp_sec: 1531779145.71
  module_name: "perception_obstacle"
  sequence_num: 77
  lidar_timestamp: 0
  camera_timestamp: 1523917555000912128
  radar_timestamp: 0
}
error_code: PERCEPTION_ERROR_PROCESS
lane_marker {
}

LanePostProcessing node lane_post_processing_subnode.cc still fails at line 154 AERROR << "failed to get shared data. event:" << event.to_string();

screenshot from 2018-07-17 00-29-45

snuffysasa commented 6 years ago

Does the visualizer work?

./scripts/perception_offline_visualizer.sh

It took me a long time before I was able to get this to work, but I'll see if I am any help.

vladpaunescu commented 6 years ago

No, I couldn't run ./scripts/perception_offline_visualizer.sh becuase of docker OpenGL error.

Unfortunately rostopic echo /apollo/perception/obstacles shows no lane marker when running ./scripts/perception_lowcost.sh :

header {
  timestamp_sec: 1531779145.71
  module_name: "perception_obstacle"
  sequence_num: 77
  lidar_timestamp: 0
  camera_timestamp: 1523917555000912128
  radar_timestamp: 0
}
error_code: PERCEPTION_ERROR_PROCESS
lane_marker {
}
snuffysasa commented 6 years ago

yea, the openGL error is a headache. I think Nvidia drivers need to be installed with a flag: --no-opengl-files.

But ignoring the visualizer,

To verify the perception module is working... I would create a new bag file that contains images but not detections... so only this topic, /apollo/sensor/camera/front_6mm. Then play that new bag, and run the perception module without visualization. see if you are able to rostopic echo /apollo/perception/obstacles

vladpaunescu commented 6 years ago

Thank you! That's precisely what I did. Here is the update

No lane postprocessing node.

It outputs at rostopic echo /apollo/perception/obstacles

perception_obstacle {
  id: 8
  position {
    x: 45.1654319763
    y: -5.86641836166
    z: 0.0
  }
  theta: -0.0499055683613

Also, I'm able to see something when selecting Navigation/Mkz Example/Demo in Dreamview. How can I do lane segmentation and OD? LanePostProcessing Node fails when I run it. Do you know how is it doing 3D bouding boxes using yolo?

screenshot from 2018-07-17 01-51-47

snuffysasa commented 6 years ago

"How can I do lane segmentation and OD?"

I am not sure what this means.

LanePostProcessing Node fails when I run it.

This works for me: https://github.com/ApolloAuto/apollo/blob/master/modules/perception/conf/dag_camera_obstacle_lane_vis.config

and you can even modify it to remove the visualizer, so its just camera and lanes.

"Do you know how is it doing 3D bouding boxes using yolo?"

I am not sure, I'd like to know.

snuffysasa commented 6 years ago

I wish there was a better sample bag file with images. I can upload and share one later this week.

Demo2.5 is not a very good sample IMO.