uzh-rpg / rpg_esim

ESIM: an Open Event Camera Simulator
MIT License
565 stars 120 forks source link

Problem With Installation of Color Feature #123

Open ezragblock opened 2 months ago

ezragblock commented 2 months ago

Hello,

I'm working on installing the color feature. everything builds well except for the esim_ros. The issue it gives is the following:

Errors << esim_ros:make /home/ezrag/sim_ws/logs/esim_ros/build.make.009.log File "/home/ezrag/sim_ws/src/rpg_esim/event_camera_simulator/esim_ros/cfg/example_color.cfg", line 4 --path_to_output_bag=/tmp/out.bag ^ SyntaxError: invalid syntax make[2]: [CMakeFiles/esim_ros_gencfg.dir/build.make:76: /home/ezrag/sim_ws/devel/.private/esim_ros/include/esim_ros/example_colorConfig.h] Error 1 make[1]: [CMakeFiles/Makefile2:2838: CMakeFiles/esim_ros_gencfg.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... make: [Makefile:146: all] Error 2

I tried renaming the cfg file to conf or moving it, but that just causes this issue:

Errors << esim_ros:make /home/ezrag/sim_ws/logs/esim_ros/build.make.008.log make[2]: No rule to make target '/home/ezrag/sim_ws/src/rpg_esim/event_camera_simulator/esim_ros/cfg/example_color.cfg', needed by '/home/ezrag/sim_ws/devel/.private/esim_ros/include/esim_ros/example_colorConfig.h'. Stop. make[1]: [CMakeFiles/Makefile2:2838: CMakeFiles/esim_ros_gencfg.dir/all] Error 2 make[1]: Waiting for unfinished jobs.... make: [Makefile:146: all] Error 2

any ideas why this is happening? It seems to me that the build is trying to refer to it as pythonic code, even though it's just a configuration file that doesn't fit the python language standards.

image

ezragblock commented 2 months ago

If anyone runs into that issue too, you need to switch example_color.ctg contents with this:

!/usr/bin/env python

PACKAGE = "esim_ros" from dynamic_reconfigure.parameter_generator_catkin import *

gen = ParameterGenerator()

add parameters here, for example:

gen.add("vmodule", str_t, 0, "The vmodule parameter", "--vmodule=data_provider_online_render=0,camera_simulator=0") gen.add("random_seed", int_t, 0, "The random seed", 50) gen.add("data_source", int_t, 0, "The data source", 0) gen.add("path_to_output_bag", str_t, 0, "The path to the output bag", "/tmp/out.bag")

... add the rest of your parameters here ...

gen.add("contrast_threshold_pos", double_t, 0, "The contrast threshold pos", 0.15) gen.add("contrast_threshold_neg", double_t, 0, "The contrast threshold neg", 0.15) gen.add("contrast_threshold_sigma_pos", int_t, 0, "The contrast threshold sigma pos", 0) gen.add("contrast_threshold_sigma_neg", int_t, 0, "The contrast threshold sigma neg", 0)

gen.add("exposure_time_ms", double_t, 0, "The exposure time in ms", 20.0) gen.add("use_log_image", bool_t, 0, "Whether to use log image", True) gen.add("log_eps", double_t, 0, "The log eps", 0.001) gen.add("simulate_color_events", bool_t, 0, "Whether to simulate color events", True)

gen.add("calib_filename", str_t, 0, "The calibration filename", "/home/user/sim_ws/src/rpg_esim/event_camera_simulator/esim_ros/cfg/calib/pinhole_mono_nodistort.yaml")

gen.add("renderer_type", int_t, 0, "The renderer type", 0) gen.add("renderer_texture", str_t, 0, "The renderer texture", "/home/user/sim_ws/src/rpg_esim/event_camera_simulator/imp/imp_planar_renderer/textures/carpet.jpg") gen.add("renderer_hfov_cam_source_deg", double_t, 0, "The renderer hfov cam source deg", 85.0) gen.add("renderer_preprocess_gaussian_blur", double_t, 0, "The renderer preprocess gaussian blur", 0.25) gen.add("renderer_preprocess_median_blur", int_t, 0, "The renderer preprocess median blur", 11) gen.add("renderer_plane_x", double_t, 0, "The renderer plane x", 0.0) gen.add("renderer_plane_y", double_t, 0, "The renderer plane y", 0.0) gen.add("renderer_plane_z", double_t, 0, "The renderer plane z", -1.0) gen.add("renderer_plane_qw", double_t, 0, "The renderer plane qw", 0.0) gen.add("renderer_plane_qx", double_t, 0, "The renderer plane qx", 1.0) gen.add("renderer_plane_qy", double_t, 0, "The renderer plane qy", 0.0) gen.add("renderer_plane_qz", double_t, 0, "The renderer plane qz", 0.0) gen.add("renderer_extend_border", int_t, 0, "The renderer extend border", 1) gen.add("renderer_zmin", double_t, 0, "The renderer zmin", 1.0)

gen.add("trajectory_type", int_t, 0, "The trajectory type", 0) gen.add("trajectory_length_s", double_t, 0, "The trajectory length in seconds", 30.0) gen.add("trajectory_sampling_frequency_hz", int_t, 0, "The trajectory sampling frequency in Hz", 5) gen.add("trajectory_spline_order", int_t, 0, "The trajectory spline order", 5) gen.add("trajectory_num_spline_segments", int_t, 0, "The number of trajectory spline segments", 100) gen.add("trajectory_lambda", double_t, 0, "The trajectory lambda", 0.01) gen.add("trajectory_multiplier_x", double_t, 0, "The trajectory multiplier x", 0.5) gen.add("trajectory_multiplier_y", double_t, 0, "The trajectory multiplier y", 0.5) gen.add("trajectory_multiplier_z", double_t, 0, "The trajectory multiplier z", 0.25) gen.add("trajectory_multiplier_wx", double_t, 0, "The trajectory multiplier wx", 0.15) gen.add("trajectory_multiplier_wy", double_t, 0, "The trajectory multiplier wy", 0.15) gen.add("trajectory_multiplier_wz", double_t, 0, "The trajectory multiplier wz", 0.15)

gen.add("simulation_minimum_framerate", double_t, 0, "The simulation minimum framerate", 20.0) gen.add("simulation_imu_rate", double_t, 0, "The simulation imu rate", 1000.0) gen.add("simulation_adaptive_sampling_method", int_t, 0, "The simulation adaptive sampling method", 1) gen.add("simulation_adaptive_sampling_lambda", double_t, 0, "The simulation adaptive sampling lambda", 0.5)

gen.add("ros_publisher_frame_rate", double_t, 0, "The ros publisher frame rate", 10000000000000000) gen.add("ros_publisher_depth_rate", int_t, 0, "The ros publisher depth rate", 10) gen.add("ros_publisher_optic_flow_rate", int_t, 0, "The ros publisher optic flow rate", 0) gen.add("ros_publisher_pointcloud_rate", int_t, 0, "The ros publisher pointcloud rate", 0) gen.add("ros_publisher_camera_info_rate", int_t, 0, "The ros publisher camera info rate", 1)

exit(gen.generate(PACKAGE, "esim_ros", "ExampleColor"))