Open supitalp opened 6 years ago
The problem comes from the GPU / OpenGL version not supporting the number of anti-aliasing samples (currently hard-coded to 16 here: https://github.com/uzh-rpg/rpg_esim/blob/master/event_camera_simulator/imp/imp_opengl_renderer/src/opengl_renderer.cpp#L97)
As a quick fix, change this line: https://github.com/uzh-rpg/rpg_esim/blob/master/event_camera_simulator/imp/imp_opengl_renderer/src/opengl_renderer.cpp#L97 to set a smaller value (maybe, 4?), and recompile. The problem should disappear.
I will soon commit a patch for this, properly looking up the maximum allowed number of samples through OpenGL.
I have the same problem when I launch the OpenGL renderer, I get a crash as follows:
> NODES
/
dvs_renderer (dvs_renderer/dvs_renderer)
esim_node (esim_ros/esim_node)
hector_trajectory_server (hector_trajectory_server/hector_trajectory_server)
optic_flow_viz (esim_visualization/optic_flow_converter.py)
auto-starting new master
process[master]: started with pid [12592]
ROS_MASTER_URI=http://localhost:11311
setting /run_id to 12f9bcc8-fd22-11e8-9c01-34e6d7284e42
process[rosout-1]: started with pid [12605]
started core service [/rosout]
process[esim_node-2]: started with pid [12619]
process[dvs_renderer-3]: started with pid [12623]
process[optic_flow_viz-4]: started with pid [12624]
process[hector_trajectory_server-5]: started with pid [12625]
I1211 09:52:23.211774 12619 data_provider_online_render.cpp:63] Horizontal FOV: 61.7164 deg
I1211 09:52:23.216259 12619 data_provider_online_render.cpp:64] Vertical FOV: 48.2168 deg
I1211 09:52:23.216284 12619 data_provider_online_render.cpp:65] Diagonal FOV: 73.4823 deg
[ INFO] [1544518343.227088247]: Waiting for tf transform data between frames map and cam0 to become available
I1211 09:52:23.283802 12619 model.h:54] will load model at: /home/oaiepc/sim_ws/src/rpg_esim/event_camera_simulator/imp/imp_opengl_renderer/resources/objects/flying_room/flying_room.obj
[INFO] [1544518343.658850]: Started flow converter node
[INFO] [1544518343.659282]: Step size between arrows: 7
[INFO] [1544518343.659455]: Scale factor: 0.07
[INFO] [1544518343.659613]: Upsample factor: x1
[INFO] [1544518343.659764]: Publish rate: 100 Hz
F1211 09:52:23.684607 12619 opengl_renderer.cpp:116] ERROR: failed to set up multisampled framebuffer
*** Check failure stack trace: ***
@ 0x7f3b756fb43d google::LogMessage::Fail()
@ 0x7f3b756fd253 google::LogMessage::SendToLog()
@ 0x7f3b756fafcb google::LogMessage::Flush()
@ 0x7f3b756fdc3e google::LogMessageFatal::~LogMessageFatal()
@ 0x7f3b7173d62a event_camera_simulator::OpenGLRenderer::init()
@ 0x7f3b7173dd7a event_camera_simulator::OpenGLRenderer::setCamera()
@ 0x7f3b76cda786 event_camera_simulator::DataProviderOnlineMoving3DCameraRig::DataProviderOnlineMoving3DCameraRig()
@ 0x7f3b76cd2a97 event_camera_simulator::loadDataProviderFromGflags()
@ 0x404e4e main
@ 0x7f3b74b8b830 __libc_start_main
@ 0x4057c9 _start
[esim_node-2] process has died [pid 12619, exit code -6, cmd /home/oaiepc/sim_ws/devel/lib/esim_ros/esim_node --v=1 --vmodule=data_provider_from_folder=10 --flagfile=/home/oaiepc/sim_ws/src/rpg_esim/event_camera_simulator/esim_ros/cfg/opengl.conf __name:=esim_node __log:=/home/oaiepc/.ros/log/12f9bcc8-fd22-11e8-9c01-34e6d7284e42/esim_node-2.log].
log file: /home/oaiepc/.ros/log/12f9bcc8-fd22-11e8-9c01-34e6d7284e42/esim_node-2*.log
I have changed the number of samples from 16 to 4 in opengl_renderer.cpp#L96 , but this does not seems to work either, any suggestion?
Have you tried to set it to something smaller? Maybe 2, or 1? What kind of GPU do you have?
Yes, I have tried all values between 1 and 16. These are the details of my GPU
00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 0b) (prog-if 00 [VGA controller]) DeviceName: Onboard IGD Subsystem: Dell Haswell-ULT Integrated Graphics Controller [1028:05cb] Flags: bus master, fast devsel, latency 0, IRQ 45 Memory at f7800000 (64-bit, non-prefetchable) [size=4M] Memory at e0000000 (64-bit, prefetchable) [size=256M] I/O ports at f000 [size=64] [virtual] Expansion ROM at 000c0000 [disabled] [size=128K] Capabilities: [90] MSI: Enable+ Count=1/1 Maskable- 64bit- Capabilities: [d0] Power Management version 2 Capabilities: [a4] PCI Advanced Features Kernel driver in use: i915 Kernel modules: i915
Just to avoid misunderstandings when you say to change the value of the number of samples and to recompile , you mean
right ?
Thank you for the info.
You also need ro recompile between step 2 and step 3 (catkin build esim_ros
), can you confirm you also did that?
No , that was the problem, now it perfectly works, thanks a lot for the support !
Nice! I will leave the issue open still since other people might encounter the same issue. Will close it when I fix this. Thanks for your feedback.
Hi, I have the same problem, but the above link https://github.com/uzh-rpg/rpg_event_camera_simulator/blob/master/event_camera_simulator/imp/imp_opengl_renderer/src/opengl_renderer.cpp#L96 is not fount. So could you give me some other suggestions?
Thank you very much!! @supitalp @galmdea
Hi,I have changed the number of samples from 16 to 4 in opengl_renderer.cpp#L96.
runroslaunch esim_ros esim.launch config:=cfg/opengl.conf
and run rviz -d cfg/esim.rviz
can you give some suggestion?
Hi, Glad that you found a solution to your first problem. Here is the fixed URL: https://github.com/uzh-rpg/rpg_esim/blob/master/event_camera_simulator/imp/imp_opengl_renderer/src/opengl_renderer.cpp#L97
Regarding your second question, what is the problem exactly? The events (and everything else) should be published on their respective topic, I don't see anything wrong with your screenshot.
Thank you for your reply. I am a newer, I just do not know how to use this simulator, the visualization is like some random chaos.
Hi, I see. It's a good point, there is currently no "beginner-friendly" tutorial, we assume that users have familiarity with ROS already. If you do not know anything about ROS, giving a quick look at the ROS tutorials would be a good starting point. ESIM will publish data from the different simulated sensors (most importantly, the events) on different topics, and additionally save everything to a rosbag (the data format of ROS), Then, you can either: 1) write a ROS node to listen to one or more topics to do some processing in real-time, or 2) read data from the rosbag (offline) (see tutorial here).
Finally, we provide two simple ways to visualize the data in real-time as it is simulated through the tools rviz and rqt. The "random chaos" you describe in your rviz screenshot above is the camera trajectory (by default, it is set to a random spline).
Hope that helps.
Thank you for your detailed reply. Your suggestion is very helpful!
Hi @supitalp, related to this - is it possible to run OpenGLRenderer on CPU? In such a case is it ok to set 1 instead of 16, as you mentioned? https://github.com/uzh-rpg/rpg_esim/issues/1#issuecomment-434198219
When I launch the OpenGL renderer, I get a crash with the following log: