ros-simulation / gazebo_ros_pkgs

Wrappers, tools and additional API's for using ROS with Gazebo
http://wiki.ros.org/gazebo_ros_pkgs
760 stars 772 forks source link

Robot unstable with bullet physics, gazebo-classic and ros1 #1493

Open kirillin opened 1 year ago

kirillin commented 1 year ago

Environment

Description

I set the empty_world argument physics -> bullet, spawn my robot manipulator with ros_controllers and got this output:

... logging to /root/.ros/log/d191a974-2154-11ee-8be8-9078413954b8/roslaunch-summer-15447.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://summer:35727/

SUMMARY
========

PARAMETERS
 * /controller/action_monitor_rate: 10
 * /controller/constraints/goal_time: 0.6
 * /controller/constraints/joint_1/goal: 0.01
 * /controller/constraints/joint_1/trajectory: 0.1
 * /controller/constraints/joint_2/goal: 0.01
 * /controller/constraints/joint_2/trajectory: 0.1
 * /controller/constraints/joint_3/goal: 0.01
 * /controller/constraints/joint_3/trajectory: 0.1
 * /controller/constraints/joint_4/goal: 0.01
 * /controller/constraints/joint_4/trajectory: 0.1
 * /controller/constraints/joint_5/goal: 0.01
 * /controller/constraints/joint_5/trajectory: 0.1
 * /controller/constraints/joint_6/goal: 0.01
 * /controller/constraints/joint_6/trajectory: 0.1
 * /controller/constraints/stopped_velocity_tolerance: 0.0
 * /controller/joints: ['joint_1', 'join...
 * /controller/state_publish_rate: 125
 * /controller/stop_trajectory_duration: 0.5
 * /controller/type: position_controll...
 * /gazebo/enable_ros_network: True
 * /gazebo/sor_pgs_iters: 300
 * /joint_state_controller/publish_rate: 125.0
 * /joint_state_controller/type: joint_state_contr...
 * /robot_description: <?xml version="1....
 * /rosdistro: noetic
 * /rosversion: 1.16.0
 * /use_sim_time: True

NODES
  /
    fanuc_arm_controller (controller_manager/spawner)
    gazebo (gazebo_ros/gzserver)
    gazebo_gui (gazebo_ros/gzclient)
    robot_state_publisher (robot_state_publisher/robot_state_publisher)
    state_controller_spawner (controller_manager/spawner)
    urdf_spawner (gazebo_ros/spawn_model)

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

setting /run_id to d191a974-2154-11ee-8be8-9078413954b8
process[rosout-1]: started with pid [15467]
started core service [/rosout]
process[gazebo-2]: started with pid [15473]
process[gazebo_gui-3]: started with pid [15479]
process[robot_state_publisher-4]: started with pid [15484]
process[urdf_spawner-5]: started with pid [15485]
process[state_controller_spawner-6]: started with pid [15486]
process[fanuc_arm_controller-7]: started with pid [15487]
[INFO] [1689235868.633270, 0.000000]: Waiting for /clock to be available...
[INFO] [1689235868.669324, 0.000000]: Waiting for /clock to be available...
[INFO] [1689235868.720835, 0.000000]: Loading model XML from ros parameter robot_description
[INFO] [1689235868.728920, 0.000000]: Waiting for service /gazebo/spawn_urdf_model
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[Wrn] [GuiIface.cc:200] g/gui-plugin is really loading a SystemPlugin. To load a GUI plugin please use --gui-client-plugin 
Gazebo multi-robot simulator, version 11.11.0
Copyright (C) 2012 Open Source Robotics Foundation.
Released under the Apache 2 License.
http://gazebosim.org

[ INFO] [1689235869.022467503]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1689235869.023729663]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting...
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.1.34
[ INFO] [1689235869.157993093]: Finished loading Gazebo ROS API Plugin.
[ INFO] [1689235869.159039318]: waitForService: Service [/gazebo_gui/set_physics_properties] has not been advertised, waiting...
[Msg] Waiting for master.
[Msg] Connected to gazebo master @ http://127.0.0.1:11345
[Msg] Publicized address: 192.168.1.34
[Msg] Loading world file [/usr/share/gazebo-11/worlds/empty.world]
[Wrn] [GuiIface.cc:120] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[ INFO] [1689235869.456869318]: waitForService: Service [/gazebo/set_physics_properties] is now available.
[ERROR] [1689235869.479659826, 0.002000000]: ROS get_physics_properties service call does not yet support physics engine [bullet].
[ INFO] [1689235869.488422161, 0.010000000]: Physics dynamic reconfigure ready.
[Err] [InsertModelWidget.cc:403] Missing model.config for model "/rosws/src/trimesh_collision_gazebo/../.vscode"
[Err] [InsertModelWidget.cc:403] Missing model.config for model "/rosws/src/trimesh_collision_gazebo/../bricky-sim"
[Err] [InsertModelWidget.cc:403] Missing model.config for model "/rosws/src/trimesh_collision_gazebo/../trimesh_collision_gazebo"
[INFO] [1689235869.636565, 0.150000]: Calling service /gazebo/spawn_urdf_model
[INFO] [1689235869.803427, 0.316000]: /clock is published. Proceeding to load the controller(s).
[INFO] [1689235869.808931, 0.319000]: Controller Spawner: Waiting for service controller_manager/load_controller
[ INFO] [1689235870.379039727, 0.349000000]: Laser Plugin: Using the 'robotNamespace' param: '/'
[ INFO] [1689235870.379087794, 0.349000000]: Starting Laser Plugin (ns = /)
[ INFO] [1689235870.380650755, 0.349000000]: Laser Plugin (ns = /)  <tf_prefix_>, set to ""
[Err] [BulletHingeJoint.cc:413] Joint must be created before setting friction
[Err] [BulletHingeJoint.cc:455] Joint must be created before getting friction
[INFO] [1689235870.385089, 0.349000]: Spawn status: SpawnModel: Successfully spawned entity
[urdf_spawner-5] process has finished cleanly
log file: /root/.ros/log/d191a974-2154-11ee-8be8-9078413954b8/urdf_spawner-5*.log
[Err] [BulletHingeJoint.cc:317] Joint must be created before calling SetUpperLimit
[Err] [BulletHingeJoint.cc:341] Joint must be created before calling SetLowerLimit
[Msg] Loading vacuum_gripper
[Msg] Ros inited 
[Msg] Ros state pub inited 
[Msg] GZ world and fixed joint inited
[Msg] gripper_link_sponge
[Msg] GZ gripper link sponge got 
[Msg] ROS bumper inited
[Msg] ROS enable service inited
[Msg] Loaded vacuum_gripper
[ INFO] [1689235871.635058607, 0.349000000]: Realsense Gazebo ROS plugin loading.
[Msg] IPHONE Plugin loading

RealSensePlugin: The realsense_camera plugin is attach to model fanuc
RealSensePlugin: Depth Camera found
[Msg] IPHONE Plugin loaded
[ INFO] [1689235871.668823746, 0.349000000]: Loading gazebo_ros_control plugin
[ INFO] [1689235871.669155878, 0.349000000]: Starting gazebo_ros_control plugin in namespace: /
[ INFO] [1689235871.670318112, 0.349000000]: gazebo_ros_control plugin is waiting for model URDF in parameter [robot_description] on the ROS param server.
[ERROR] [1689235871.786524648, 0.349000000]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/joint_1
[Dbg] [BulletJoint.cc:570] Not implement in Bullet
[ERROR] [1689235871.787185919, 0.349000000]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/joint_2
[Dbg] [BulletJoint.cc:570] Not implement in Bullet
[ERROR] [1689235871.787724179, 0.349000000]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/joint_3
[Dbg] [BulletJoint.cc:570] Not implement in Bullet
[ERROR] [1689235871.788287703, 0.349000000]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/joint_4
[Dbg] [BulletJoint.cc:570] Not implement in Bullet
[ERROR] [1689235871.788801367, 0.349000000]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/joint_5
[Dbg] [BulletJoint.cc:570] Not implement in Bullet
[ERROR] [1689235871.789287986, 0.349000000]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/joint_6
[Dbg] [BulletJoint.cc:570] Not implement in Bullet
[ERROR] [1689235871.790044163, 0.349000000]: No p gain specified for pid.  Namespace: /gazebo_ros_control/pid_gains/sponge_joint
[Dbg] [BulletJoint.cc:570] Not implement in Bullet
[ INFO] [1689235871.795942257, 0.349000000]: Loaded gazebo_ros_control.
[INFO] [1689235871.924055, 0.367000]: /clock is published. Proceeding to load the controller(s).
[INFO] [1689235871.925539, 0.367000]: Controller Spawner: Waiting for service controller_manager/load_controller
[INFO] [1689235871.927805, 0.367000]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1689235871.928619, 0.367000]: Controller Spawner: Waiting for service controller_manager/switch_controller
[INFO] [1689235871.930587, 0.368000]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1689235871.931389, 0.368000]: Controller Spawner: Waiting for service controller_manager/unload_controller
[INFO] [1689235871.940568, 0.368000]: Loading controller: controller
[INFO] [1689235871.942247, 0.368000]: Loading controller: joint_state_controller
[INFO] [1689235872.083202, 0.381000]: Controller Spawner: Loaded controllers: controller
[INFO] [1689235872.106416, 0.384000]: Controller Spawner: Loaded controllers: joint_state_controller
[INFO] [1689235872.117818, 0.385000]: Started controllers: controller
[INFO] [1689235872.128806, 0.386000]: Started controllers: joint_state_controller

My robot is available in gazebo world and I can control it. However, there is chattering of links of the robot and robot tends to unstable behavior. Also, there in no effect if I change any bullet physics parameters in .world. The video is demonstrating the issue https://youtu.be/dyZejJyFLKE

My questing is did it fully implemented the Bullet functionality in gazebo_ros and gazebo? Are there same behavior with ignition gazebo and ros2?

Thank you! You did realy great job on ros simulation!