ipa320 / cob_simulation

The cob_simulation stack includes packages to work with Care-O-bot within simulation environments, e.g. gazebo.
www.care-o-bot.org
Apache License 2.0
73 stars 106 forks source link

Endless robot model rotation #165

Closed AlvaroFerGar closed 5 years ago

AlvaroFerGar commented 5 years ago

Hello everyone!

I have recently made a new installation of Ubuntu 16.04 and ROS Kinetic. I'm involved in a project that uses the raw3-5 model to achieve autonomous navigation. As I have made before, I downloaded all the ros-kinetic-cob-xxxx package in this new PC. This process has been successfully applied in a couple of installations allowing the spawn of a perfectly controllable robot.

However, surprisingly, in this new installation the robot spawns in the Gazebo world constantly rotating. There are messages publishing in _/base/twist_controller/wheelcommands but there isn't any movement in _/base/twist_mux/commandnavigation.

I hope someone has an idea of what is the problem. Thanks in advance!

P.S: In case is helpful, I leave here the output of the terminal but it's very similar to the "old good ones".

roslaunch cob_bringup_sim robot.launch robot:=raw3-5 robot_env:=empty ... logging to /home/irobot-user/.ros/log/a6b0672e-35fc-11e9-a56c-00012e4bb757/roslaunch-irobotuser-MotherBoard-Z77ITX-A-E-9019.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://irobotuser-MotherBoard-Z77ITX-A-E:35785/

SUMMARY

PARAMETERS

NODES /base_laser_front/ scan_filter (cob_sick_s300/cob_scan_filter) /base/ base_controller_spawner (controller_manager/controller_manager) fake_driver (cob_helper_tools/fake_driver.py) twist_marker (twist_mux/twist_marker) twist_mux (twist_mux/twist_mux) velocity_smoother (cob_base_velocity_smoother/velocity_smoother) /teleop/ teleop_node_irobotuser_MotherBoard_Z77ITX_A_E_9019_4882686815638388371 (cob_teleop/cob_teleop) / battery_monitor (cob_monitoring/battery_monitor.py) collision_velocity_filter (cob_collision_velocity_filter/collision_velocity_filter) dashboard_aggregator (cob_dashboard/cob_dashboard_aggregator.py) diagnostic_aggregator (diagnostic_aggregator/aggregator_node) emergency_stop_monitor (cob_monitoring/emergency_stop_monitor.py) fake_diagnostics_irobotuser_MotherBoard_Z77ITX_A_E_9019_3976842668907155648 (cob_helper_tools/fake_diagnostics.py) gazebo (gazebo_ros/gzserver) gazebo_gui (gazebo_ros/gzclient) joint_state_publisher (joint_state_publisher/joint_state_publisher) joy_node_irobotuser_MotherBoard_Z77ITX_A_E_9019_5973522723850412079 (joy/joy_node) robot_state_publisher (robot_state_publisher/robot_state_publisher) script_server (cob_script_server/script_server.py) spawn_gazebo_model (gazebo_ros/spawn_model) spawn_urdf_world (gazebo_ros/spawn_model) voltage_controller (cob_voltage_control/cob_voltage_control) /base_laser_rear/ scan_filter (cob_sick_s300/cob_scan_filter)

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

setting /run_id to a6b0672e-35fc-11e9-a56c-00012e4bb757 process[rosout-1]: started with pid [9050] started core service [/rosout] running rosparam delete /objects ERROR: parameter [/objects] is not set running rosparam delete /diagnostic_aggregator/diagnostic_aggregator/ ERROR: parameter [/diagnostic_aggregator/diagnostic_aggregator] is not set process[gazebo-2]: started with pid [9077] process[gazebo_gui-3]: started with pid [9082] process[spawn_urdf_world-4]: started with pid [9087] process[base_laser_front/scan_filter-5]: started with pid [9088] process[base_laser_rear/scan_filter-6]: started with pid [9089] process[emergency_stop_monitor-7]: started with pid [9096] process[voltage_controller-8]: started with pid [9112] process[battery_monitor-9]: started with pid [9119] process[base/fake_driver-10]: started with pid [9130] process[base/base_controller_spawner-11]: started with pid [9139] process[base/twist_mux-12]: started with pid [9146] process[base/twist_marker-13]: started with pid [9153] process[base/velocity_smoother-14]: started with pid [9159] process[diagnostic_aggregator-15]: started with pid [9185] process[dashboard_aggregator-16]: started with pid [9192] process[joy_node_irobotuser_MotherBoard_Z77ITX_A_E_9019_5973522723850412079-17]: started with pid [9203] process[teleop/teleop_node_irobotuser_MotherBoard_Z77ITX_A_E_9019_4882686815638388371-18]: started with pid [9219] process[collision_velocity_filter-19]: started with pid [9226] process[robot_state_publisher-20]: started with pid [9238] [ INFO] [1550769487.647062587]: Topic handler 'collision_velocity_filter' subscribed to topic 'twist_mux/command_safe': timeout = 0.250000s, priority = 10 process[joint_state_publisher-21]: started with pid [9247] process[script_server-22]: started with pid [9255] process[fake_diagnostics_irobotuser_MotherBoard_Z77ITX_A_E_9019_3976842668907155648-23]: started with pid [9269] process[spawn_gazebo_model-24]: started with pid [9286] [ INFO] [1550769487.780766949]: Topic handler 'navigation' subscribed to topic 'twist_mux/command_navigation': timeout = 0.250000s, priority = 20 [ INFO] [1550769487.894412266]: Topic handler 'syncmm' subscribed to topic 'twist_mux/command_syncmm': timeout = 0.500000s, priority = 60 [ INFO] [1550769487.991054323]: Topic handler 'script_server' subscribed to topic 'twist_mux/command_script_server': timeout = 0.500000s, priority = 70 [ERROR] [1550769488.043499693]: Couldn't open joystick /dev/input/js0. Will retry every second. [ INFO] [1550769488.072368887]: Reconfigure request : 1.000000 1.000000 1.000000 0.500000 0.500000 0.500000 1.500000 3.500000 [INFO] [1550769488.075863, 0.000000]: fake_driver running [ INFO] [1550769488.083447478]: Topic handler 'teleop_keyboard' subscribed to topic 'twist_mux/command_teleop_keyboard': timeout = 0.500000s, priority = 80 the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update' the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update' [ INFO] [1550769488.162747945]: Topic handler 'teleop_android' subscribed to topic 'twist_mux/command_teleop_android': timeout = 0.500000s, priority = 90 the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update' SpawnModel script started [ INFO] [1550769488.259241121]: Topic handler 'teleop_joystick' subscribed to topic 'twist_mux/command_teleop_joy': timeout = 0.250000s, priority = 100 [ INFO] [1550769488.287285064]: Topic handler 'pause_navigation' subscribed to topic 'twist_mux/locks/pause_navigation': timeout = None, priority = 21 [ INFO] [1550769488.300912155]: Topic handler 'pause_teleop' subscribed to topic 'twist_mux/locks/pause_teleop': timeout = None, priority = 101 [ INFO] [1550769488.314679622]: Topic handler 'pause_all' subscribed to topic 'twist_mux/locks/pause_all': timeout = None, priority = 255 [ INFO] [1550769488.323422193]: Finished loading Gazebo ROS API Plugin. [ INFO] [1550769488.325039430]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update' [ INFO] [1550769488.387799552]: Finished loading Gazebo ROS API Plugin. [ INFO] [1550769488.388171982]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [INFO] [1550769488.404805, 0.000000]: Loading model XML from ros parameter [INFO] [1550769488.405707, 0.000000]: Waiting for service /gazebo/spawn_urdf_model the rosdep view is empty: call 'sudo rosdep init' and 'rosdep update' SpawnModel script started [INFO] [1550769489.311600, 0.000000]: Calling service /gazebo/spawn_urdf_model [ INFO] [1550769489.339704028, 0.023000000]: waitForService: Service [/gazebo/set_physics_properties] is now available. [INFO] [1550769489.503756, 0.160000]: Spawn status: SpawnModel: Successfully spawned entity [ INFO] [1550769489.523889044, 0.177000000]: Physics dynamic reconfigure ready. [ INFO] [1550769489.580135076, 0.235000000]: Using plugin "obstacle_layer" [INFO] [1550769489.582348, 0.237000]: Loading model XML from ros parameter [INFO] [1550769489.587562, 0.240000]: Waiting for service /gazebo/spawn_urdf_model [INFO] [1550769489.590096, 0.244000]: Calling service /gazebo/spawn_urdf_model [ INFO] [1550769489.590597177, 0.245000000]: Subscribed to Topics: laser_scan_front laser_scan_rear [ INFO] [1550769489.606676157, 0.260000000]: waitForService: Service [/gazebo/set_physics_properties] is now available. [INFO] [1550769489.698261, 0.352000]: script_server is running [spawn_urdf_world-4] process has finished cleanly log file: /home/irobot-user/.ros/log/a6b0672e-35fc-11e9-a56c-00012e4bb757/spawn_urdf_world-4.log [ WARN] [1550769489.766939864, 0.359000000]: Used default parameter for global_frame [/base_link] [ WARN] [1550769489.768146719, 0.359000000]: Used default parameter for robot_frame [/base_link] [ WARN] [1550769489.772351711, 0.359000000]: Used default parameter for obstacle_damping_dist [5.0 m] [INFO] [1550769489.846776, 0.359000]: Spawn status: SpawnModel: Successfully spawned entity [ INFO] [1550769489.863050232, 0.359000000]: Physics dynamic reconfigure ready. [ INFO] [1550769489.908390159, 0.359000000]: Loading cob_gazebo_ros_control plugin [ INFO] [1550769489.908480105, 0.359000000]: Enable joint-filtering. Using joint_names from parameter: "joint_names" [ INFO] [1550769489.908516890, 0.359000000]: Starting cob_gazebo_ros_control plugin in namespace: base [ INFO] [1550769489.909357438, 0.359000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [/robot_description] on the ROS param server. [ INFO] [1550769490.012805006, 0.359000000]: JointFiltering is enabled! DoF: 8 [ INFO] [1550769490.023247749, 0.359000000]: Loaded cob_gazebo_ros_control. [ WARN] [1550769490.023480341, 0.360000000]: The default_robot_hw_sim plugin is using the Joint::SetPosition method without preserving the link velocity. [ WARN] [1550769490.023745930, 0.360000000]: As a result, gravity will not be simulated correctly for your model. [ WARN] [1550769490.023786835, 0.360000000]: Please set gazebo_pid parameters, switch to the VelocityJointInterface or EffortJointInterface, or upgrade to Gazebo 9. [ WARN] [1550769490.023815142, 0.360000000]: For details, see https://github.com/ros-simulation/gazebo_ros_pkgs/issues/612 [spawn_gazebo_model-24] process has finished cleanly log file: /home/irobot-user/.ros/log/a6b0672e-35fc-11e9-a56c-00012e4bb757/spawn_gazebo_model-24.log Loaded joint_state_controller [ WARN] [1550769490.229752749, 0.565000000]: max_steer_rate: 100 [ WARN] [1550769490.229796664, 0.565000000]: max_drive_rate: 100 [ WARN] [1550769490.229881798, 0.566000000]: max_steer_rate: 100 [ WARN] [1550769490.229928653, 0.566000000]: max_drive_rate: 100 [ WARN] [1550769490.230175412, 0.566000000]: max_steer_rate: 100 [ WARN] [1550769490.230218843, 0.566000000]: max_drive_rate: 100 [ WARN] [1550769490.230256457, 0.566000000]: max_steer_rate: 100 [ WARN] [1550769490.230305386, 0.566000000]: max_drive_rate: 100 [ WARN] [1550769490.234782972, 0.570000000]: max_steer_rate: 100 [ WARN] [1550769490.234861564, 0.570000000]: max_drive_rate: 100 [ WARN] [1550769490.234915010, 0.571000000]: max_steer_rate: 100 [ WARN] [1550769490.234943467, 0.571000000]: max_drive_rate: 100 [ WARN] [1550769490.235027033, 0.571000000]: max_steer_rate: 100 [ WARN] [1550769490.235078691, 0.571000000]: max_drive_rate: 100 [ WARN] [1550769490.235118385, 0.571000000]: max_steer_rate: 100 [ WARN] [1550769490.235153586, 0.571000000]: max_drive_rate: 100 [ INFO] [1550769490.251138976, 0.586000000]: configure all steers: s: 15.000000, d: 2.750000, m: 0.100000, v: 10.000000, a: 40.000000 [ INFO] [1550769490.291975468, 0.622000000]: configure steer 0: s: 9.500000, d: 2.250000, m: 0.100000, v: 12.000000, a: 40.000000 [ INFO] [1550769490.313628076, 0.643000000]: configure steer 1: s: 9.500000, d: 2.250000, m: 0.100000, v: 12.000000, a: 40.000000 [ INFO] [1550769490.331237265, 0.661000000]: configure steer 2: s: 9.500000, d: 2.250000, m: 0.100000, v: 12.000000, a: 40.000000 [ INFO] [1550769490.349792880, 0.680000000]: configure steer 3: s: 9.500000, d: 2.250000, m: 0.100000, v: 12.000000, a: 40.000000 Loaded twist_controller Loaded odometry_controller Started ['joint_state_controller'] successfully Started ['twist_controller'] successfully Started ['odometry_controller'] successfully [base/base_controller_spawner-11] process has finished cleanly log file: /home/irobot-user/.ros/log/a6b0672e-35fc-11e9-a56c-00012e4bb757/base-base_controller_spawner-11*.log [ WARN] [1550769490.728834831, 1.059000000]: Costmap2DROS transform timeout. Current time: 1.0590, global_pose stamp: 0.0000, tolerance: 0.3000 [ WARN] [1550769490.728886767, 1.059000000]: Could not get robot pose, cancelling reconfiguration [ WARN] [1550769491.749698064, 2.059000000]: Costmap2DROS transform timeout. Current time: 2.0590, global_pose stamp: 0.0000, tolerance: 0.3000 [ WARN] [1550769491.749747696, 2.059000000]: Could not get robot pose, cancelling reconfiguration [ WARN] [1550769492.776252913, 3.059000000]: Costmap2DROS transform timeout. Current time: 3.0590, global_pose stamp: 0.0000, tolerance: 0.3000

fmessmer commented 5 years ago

please sync with https://github.com/ipa320/cob_common/issues/265 @ipa-pfs FYI

sararht commented 5 years ago

Same problem here! Did anyone solve it? Thanks!

fmessmer commented 5 years ago

I think the problem was a missing query for physics_type in the initSim function, which is used in https://github.com/ros-simulation/gazebo_ros_pkgs/blob/kinetic-devel/gazebo_ros_control/src/default_robot_hw_sim.cpp#L359-L372

this is fixed in https://github.com/ipa320/cob_gazebo_plugins/pull/38/commits/72fbd71580eea86d5afc243d3f647779c48c741c

please re-open in case you are still facing this problem