Open justinbelieber opened 4 months ago
At src/avoidbench/avoidlib/src/bridges/unity_bridge.cpp, line 8 and line 9, changing the pub port to 10253 and sub port to 10254 works for me. These ports are used by Flightmare too. Maybe the Unity file should be updated to communicate on 10255 and 10256.
When I run
roslaunch avoid_manage test_py.launch
with this output, ... logging to /home/c/.ros/log/6c85305a-0470-11ef-8cd8-81de5e42f935/roslaunch-c-67765.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://c:44907/
SUMMARY
PARAMETERS
NODES / gazebo (gazebo_ros/gzserver) /hummingbird/ autopilot (autopilot/autopilot) avoid_manage (avoid_manage/avoid_manage.py) avoidbench_render (unity_scene/AvoidBench.x86_64) rpg_rotors_interface (rpg_rotors_interface/rpg_rotors_interface) rqt_quad_gui (rqt_gui/rqt_gui) spawn_hummingbird (gazebo_ros/spawn_model)
auto-starting new master process[master]: started with pid [67837] ROS_MASTER_URI=http://localhost:11311
setting /run_id to 6c85305a-0470-11ef-8cd8-81de5e42f935 process[rosout-1]: started with pid [67879] started core service [/rosout] process[gazebo-2]: started with pid [67886] process[hummingbird/spawn_hummingbird-3]: started with pid [67891] process[hummingbird/rpg_rotors_interface-4]: started with pid [67892] process[hummingbird/autopilot-5]: started with pid [67893] [ INFO] [1714206638.110008077]: [/hummingbird/autopilot] state_predictor/integration_step_size = 0.001 [ INFO] [1714206638.110417289]: [/hummingbird/autopilot] state_predictor/maximum_prediction_horizon = 0.1 [ INFO] [1714206638.110545501]: [/hummingbird/autopilot] state_predictor/tau_thrust_up_dynamics = 0.03 [ INFO] [1714206638.110659022]: [/hummingbird/autopilot] state_predictor/tau_thrust_down_dynamics = 0.03 process[hummingbird/avoid_manage-6]: started with pid [67903] [ INFO] [1714206638.110775954]: [/hummingbird/autopilot] state_predictor/tau_angle_rate_dynamics = 0.04 [ INFO] [1714206638.110903469]: [/hummingbird/autopilot] state_estimate_timeout = 0.1 [ INFO] [1714206638.111014995]: [/hummingbird/autopilot] velocity_estimate_in_world_frame = 0 [ INFO] [1714206638.111131064]: [/hummingbird/autopilot] control_command_delay = 0.05 [ INFO] [1714206638.111246735]: [/hummingbird/autopilot] start_land_velocity = 0.5 [ INFO] [1714206638.111360040]: [/hummingbird/autopilot] start_land_acceleration = 1 [ INFO] [1714206638.111476169]: [/hummingbird/autopilot] start_idle_duration = 2 [ INFO] [1714206638.111588258]: [/hummingbird/autopilot] idle_thrust = 2 [ INFO] [1714206638.111712563]: [/hummingbird/autopilot] optitrack_start_height = 1 [ INFO] [1714206638.111821427]: [/hummingbird/autopilot] optitrack_start_land_timeout = 5 [ INFO] [1714206638.111940295]: [/hummingbird/autopilot] optitrack_land_drop_height = 0.3 [ INFO] [1714206638.112051823]: [/hummingbird/autopilot] propeller_ramp_down_timeout = 1.5 [ INFO] [1714206638.112162918]: [/hummingbird/autopilot] breaking_velocity_threshold = 0.2 [ INFO] [1714206638.112271241]: [/hummingbird/autopilot] breaking_timeout = 0.5 [ INFO] [1714206638.112377580]: [/hummingbird/autopilot] go_to_pose_max_velocity = 1.5 [ INFO] [1714206638.112493242]: [/hummingbird/autopilot] go_to_pose_max_normalized_thrust = 12 [ INFO] [1714206638.112606509]: [/hummingbird/autopilot] go_to_pose_max_roll_pitch_rate = 0.5 [ INFO] [1714206638.112715284]: [/hummingbird/autopilot] velocity_command_input_timeout = 0.1 [ INFO] [1714206638.112822724]: [/hummingbird/autopilot] tau_velocity_command = 0.8 [ INFO] [1714206638.112931414]: [/hummingbird/autopilot] reference_state_input_timeout = 0.2 [ INFO] [1714206638.113038014]: [/hummingbird/autopilot] emergency_land_duration = 4 [ INFO] [1714206638.113143781]: [/hummingbird/autopilot] emergency_land_thrust = 9 [ INFO] [1714206638.113246652]: [/hummingbird/autopilot] control_command_input_timeout = 0.1 [ INFO] [1714206638.113350672]: [/hummingbird/autopilot] enable_command_feedthrough = 1 [ INFO] [1714206638.113459342]: [/hummingbird/autopilot] predictive_control_lookahead = 2 [ INFO] [1714206638.113567246]: [/hummingbird/autopilot] position_controller/use_rate_mode = 1 [ INFO] [1714206638.113671360]: [/hummingbird/autopilot] position_controller/kpxy = 10 [ INFO] [1714206638.113775726]: [/hummingbird/autopilot] position_controller/kdxy = 4 [ INFO] [1714206638.113878245]: [/hummingbird/autopilot] position_controller/kpz = 15 [ INFO] [1714206638.113979074]: [/hummingbird/autopilot] position_controller/kdz = 6 [ INFO] [1714206638.114085661]: [/hummingbird/autopilot] position_controller/krp = 12 [ INFO] [1714206638.114188745]: [/hummingbird/autopilot] position_controller/kyaw = 5 [ INFO] [1714206638.114292172]: [/hummingbird/autopilot] position_controller/pxy_error_max = 0.6 [ INFO] [1714206638.114393742]: [/hummingbird/autopilot] position_controller/vxy_error_max = 1 [ INFO] [1714206638.114493521]: [/hummingbird/autopilot] position_controller/pz_error_max = 0.3 [ INFO] [1714206638.114591090]: [/hummingbird/autopilot] position_controller/vz_error_max = 0.75 [ INFO] [1714206638.114689638]: [/hummingbird/autopilot] position_controller/yaw_error_max = 0.7 [ INFO] [1714206638.114789465]: [/hummingbird/autopilot] position_controller/perform_aerodynamics_compensation = 0 [ INFO] [1714206638.114887489]: [/hummingbird/autopilot] position_controller/k_drag_x = 0 [ INFO] [1714206638.114985907]: [/hummingbird/autopilot] position_controller/k_drag_y = 0 [ INFO] [1714206638.115090649]: [/hummingbird/autopilot] position_controller/k_drag_z = 0 [ INFO] [1714206638.115190280]: [/hummingbird/autopilot] position_controller/k_thrust_horz = 0 process[hummingbird/avoidbench_render-7]: started with pid [67905] process[hummingbird/rqt_quad_gui-8]: started with pid [67907] [INFO] [1714206638.319094, 0.000000]: Loading model XML from ros parameter robot_description [INFO] [1714206638.322166, 0.000000]: Waiting for service /gazebo/spawn_urdf_model mission_number: 29 [ INFO] [1714206638.489173817]: Finished loading Gazebo ROS API Plugin. [ INFO] [1714206638.489782174]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [ INFO] [1714206638.917860055]: waitForService: Service [/gazebo/set_physics_properties] is now available. [INFO] [1714206638.926307, 0.000000]: Calling service /gazebo/spawn_urdf_model [ INFO] [1714206638.930588248]: Physics dynamic reconfigure ready. /home/c/benchmark/AvoidBench/src/avoidbench/avoid_manage/params/task_outdoor.yaml [UnityBridge] Initializing ZMQ connection! [UnityBridge] Initializing ZMQ connections done! [INFO] [1714206639.132951, 0.000000]: Spawn status: SpawnModel: Successfully spawned entity [hummingbird/spawn_hummingbird-3] process has finished cleanly log file: /home/c/.ros/log/6c85305a-0470-11ef-8cd8-81de5e42f935/hummingbird-spawn_hummingbird-3*.log [UnityBridge] Trying to Connect Unity. [.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
but Finally I can;t connect Unity. But UNity is definitely running. Which Config should i change in settings?