fetch_gazebo icon indicating copy to clipboard operation
fetch_gazebo copied to clipboard

Adding namespace to Fetch Robot in Gazebo

Open salonijain12 opened this issue 4 years ago • 2 comments

Hi team,

I am trying to create a world in Gazebo comprising of multiple robots and for which I need to add namespace to Fetch robot. Please help me with the steps/ procedure for same.

I am using gazebo7 with ROS Kinetic and Ubuntu 16.04

Thanks and Regards, Saloni

salonijain12 avatar Nov 07 '19 00:11 salonijain12

Hi Team,

I have done following changes to add Namespace to fetch robot using following steps:

  1. Created an initial launch file: world.launch world.launch.pdf

  2. Added group tag in test.launch file test.launch.pdf

  3. Done changes in robot launch file : fetch1.launch.xml fetch1.launch.xml.pdf

  4. But while running the launch file controllers are not loaded: $ roslaunch fetch_gazebo world.launch ... logging to /home/saloni/.ros/log/c36e2a96-05ee-11ea-af1d-645d866d6703/roslaunch-saloni-31479.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.

xacro: Traditional processing is deprecated. Switch to --inorder processing! To check for compatibility of your document, use option --check-order. For more infos, see http://wiki.ros.org/xacro#Processing_Order xacro.py is deprecated; please use xacro instead xacro: Traditional processing is deprecated. Switch to --inorder processing! To check for compatibility of your document, use option --check-order. For more infos, see http://wiki.ros.org/xacro#Processing_Order xacro.py is deprecated; please use xacro instead

========

PARAMETERS

  • /fetch/arm_controller/follow_joint_trajectory/joints: ['shoulder_pan_jo...
  • /fetch/arm_controller/follow_joint_trajectory/type: robot_controllers...
  • /fetch/arm_controller/gravity_compensation/autostart: True
  • /fetch/arm_controller/gravity_compensation/root: torso_lift_link
  • /fetch/arm_controller/gravity_compensation/tip: gripper_link
  • /fetch/arm_controller/gravity_compensation/type: robot_controllers...
  • /fetch/arm_with_torso_controller/follow_joint_trajectory/joints: ['torso_lift_join...
  • /fetch/arm_with_torso_controller/follow_joint_trajectory/type: robot_controllers...
  • /fetch/base_controller/autostart: True
  • /fetch/base_controller/type: robot_controllers...
  • /fetch/bellows_controller/autostart: True
  • /fetch/bellows_controller/controlled_joint: bellows_joint
  • /fetch/bellows_controller/mimic_joint: torso_lift_joint
  • /fetch/bellows_controller/mimic_scale: 0.5
  • /fetch/bellows_controller/type: robot_controllers...
  • /fetch/gazebo/bellows_joint/position/d: 0.0
  • /fetch/gazebo/bellows_joint/position/i: 0.0
  • /fetch/gazebo/bellows_joint/position/i_clamp: 0.0
  • /fetch/gazebo/bellows_joint/position/p: 10.0
  • /fetch/gazebo/bellows_joint/velocity/d: 0.0
  • /fetch/gazebo/bellows_joint/velocity/i: 0.0
  • /fetch/gazebo/bellows_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/bellows_joint/velocity/p: 25.0
  • /fetch/gazebo/default_controllers: ['arm_controller/...
  • /fetch/gazebo/elbow_flex_joint/position/d: 0.1
  • /fetch/gazebo/elbow_flex_joint/position/i: 0.0
  • /fetch/gazebo/elbow_flex_joint/position/i_clamp: 0.0
  • /fetch/gazebo/elbow_flex_joint/position/p: 100.0
  • /fetch/gazebo/elbow_flex_joint/velocity/d: 0.0
  • /fetch/gazebo/elbow_flex_joint/velocity/i: 0.0
  • /fetch/gazebo/elbow_flex_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/elbow_flex_joint/velocity/p: 150.0
  • /fetch/gazebo/forearm_roll_joint/position/d: 0.1
  • /fetch/gazebo/forearm_roll_joint/position/i: 0.0
  • /fetch/gazebo/forearm_roll_joint/position/i_clamp: 0.0
  • /fetch/gazebo/forearm_roll_joint/position/p: 100.0
  • /fetch/gazebo/forearm_roll_joint/velocity/d: 0.0
  • /fetch/gazebo/forearm_roll_joint/velocity/i: 0.0
  • /fetch/gazebo/forearm_roll_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/forearm_roll_joint/velocity/p: 150.0
  • /fetch/gazebo/head_pan_joint/position/d: 0.0
  • /fetch/gazebo/head_pan_joint/position/i: 0.0
  • /fetch/gazebo/head_pan_joint/position/i_clamp: 0.0
  • /fetch/gazebo/head_pan_joint/position/p: 2.0
  • /fetch/gazebo/head_pan_joint/velocity/d: 0.0
  • /fetch/gazebo/head_pan_joint/velocity/i: 0.0
  • /fetch/gazebo/head_pan_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/head_pan_joint/velocity/p: 2.0
  • /fetch/gazebo/head_tilt_joint/position/d: 0.0
  • /fetch/gazebo/head_tilt_joint/position/i: 0.0
  • /fetch/gazebo/head_tilt_joint/position/i_clamp: 0.0
  • /fetch/gazebo/head_tilt_joint/position/p: 10.0
  • /fetch/gazebo/head_tilt_joint/velocity/d: 0.0
  • /fetch/gazebo/head_tilt_joint/velocity/i: 0.0
  • /fetch/gazebo/head_tilt_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/head_tilt_joint/velocity/p: 3.0
  • /fetch/gazebo/l_gripper_finger_joint/position/d: 0.0
  • /fetch/gazebo/l_gripper_finger_joint/position/i: 0.0
  • /fetch/gazebo/l_gripper_finger_joint/position/i_clamp: 0.0
  • /fetch/gazebo/l_gripper_finger_joint/position/p: 5000.0
  • /fetch/gazebo/l_gripper_finger_joint/velocity/d: 0.0
  • /fetch/gazebo/l_gripper_finger_joint/velocity/i: 0.0
  • /fetch/gazebo/l_gripper_finger_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/l_gripper_finger_joint/velocity/p: 0.0
  • /fetch/gazebo/l_wheel_joint/position/d: 0.0
  • /fetch/gazebo/l_wheel_joint/position/i: 0.0
  • /fetch/gazebo/l_wheel_joint/position/i_clamp: 0.0
  • /fetch/gazebo/l_wheel_joint/position/p: 0.0
  • /fetch/gazebo/l_wheel_joint/velocity/d: 0.0
  • /fetch/gazebo/l_wheel_joint/velocity/i: 0.5
  • /fetch/gazebo/l_wheel_joint/velocity/i_clamp: 6.0
  • /fetch/gazebo/l_wheel_joint/velocity/p: 8.85
  • /fetch/gazebo/r_gripper_finger_joint/position/d: 0.0
  • /fetch/gazebo/r_gripper_finger_joint/position/i: 0.0
  • /fetch/gazebo/r_gripper_finger_joint/position/i_clamp: 0.0
  • /fetch/gazebo/r_gripper_finger_joint/position/p: 5000.0
  • /fetch/gazebo/r_gripper_finger_joint/velocity/d: 0.0
  • /fetch/gazebo/r_gripper_finger_joint/velocity/i: 0.0
  • /fetch/gazebo/r_gripper_finger_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/r_gripper_finger_joint/velocity/p: 0.0
  • /fetch/gazebo/r_wheel_joint/position/d: 0.0
  • /fetch/gazebo/r_wheel_joint/position/i: 0.0
  • /fetch/gazebo/r_wheel_joint/position/i_clamp: 0.0
  • /fetch/gazebo/r_wheel_joint/position/p: 0.0
  • /fetch/gazebo/r_wheel_joint/velocity/d: 0.0
  • /fetch/gazebo/r_wheel_joint/velocity/i: 0.5
  • /fetch/gazebo/r_wheel_joint/velocity/i_clamp: 6.0
  • /fetch/gazebo/r_wheel_joint/velocity/p: 8.85
  • /fetch/gazebo/shoulder_lift_joint/position/d: 0.1
  • /fetch/gazebo/shoulder_lift_joint/position/i: 0.0
  • /fetch/gazebo/shoulder_lift_joint/position/i_clamp: 0.0
  • /fetch/gazebo/shoulder_lift_joint/position/p: 100.0
  • /fetch/gazebo/shoulder_lift_joint/velocity/d: 0.0
  • /fetch/gazebo/shoulder_lift_joint/velocity/i: 0.0
  • /fetch/gazebo/shoulder_lift_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/shoulder_lift_joint/velocity/p: 200.0
  • /fetch/gazebo/shoulder_pan_joint/position/d: 0.1
  • /fetch/gazebo/shoulder_pan_joint/position/i: 0.0
  • /fetch/gazebo/shoulder_pan_joint/position/i_clamp: 0.0
  • /fetch/gazebo/shoulder_pan_joint/position/p: 100.0
  • /fetch/gazebo/shoulder_pan_joint/velocity/d: 0.0
  • /fetch/gazebo/shoulder_pan_joint/velocity/i: 2.0
  • /fetch/gazebo/shoulder_pan_joint/velocity/i_clamp: 1.0
  • /fetch/gazebo/shoulder_pan_joint/velocity/p: 200.0
  • /fetch/gazebo/torso_lift_joint/position/d: 0.0
  • /fetch/gazebo/torso_lift_joint/position/i: 0.0
  • /fetch/gazebo/torso_lift_joint/position/i_clamp: 0.0
  • /fetch/gazebo/torso_lift_joint/position/p: 1000.0
  • /fetch/gazebo/torso_lift_joint/velocity/d: 0.0
  • /fetch/gazebo/torso_lift_joint/velocity/i: 0.0
  • /fetch/gazebo/torso_lift_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/torso_lift_joint/velocity/p: 100000.0
  • /fetch/gazebo/upperarm_roll_joint/position/d: 0.1
  • /fetch/gazebo/upperarm_roll_joint/position/i: 0.0
  • /fetch/gazebo/upperarm_roll_joint/position/i_clamp: 0.0
  • /fetch/gazebo/upperarm_roll_joint/position/p: 100.0
  • /fetch/gazebo/upperarm_roll_joint/velocity/d: 0.0
  • /fetch/gazebo/upperarm_roll_joint/velocity/i: 0.0
  • /fetch/gazebo/upperarm_roll_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/upperarm_roll_joint/velocity/p: 10.0
  • /fetch/gazebo/wrist_flex_joint/position/d: 0.1
  • /fetch/gazebo/wrist_flex_joint/position/i: 0.0
  • /fetch/gazebo/wrist_flex_joint/position/i_clamp: 0.0
  • /fetch/gazebo/wrist_flex_joint/position/p: 100.0
  • /fetch/gazebo/wrist_flex_joint/velocity/d: 0.0
  • /fetch/gazebo/wrist_flex_joint/velocity/i: 0.0
  • /fetch/gazebo/wrist_flex_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/wrist_flex_joint/velocity/p: 100.0
  • /fetch/gazebo/wrist_roll_joint/position/d: 0.1
  • /fetch/gazebo/wrist_roll_joint/position/i: 0.0
  • /fetch/gazebo/wrist_roll_joint/position/i_clamp: 0.0
  • /fetch/gazebo/wrist_roll_joint/position/p: 100.0
  • /fetch/gazebo/wrist_roll_joint/velocity/d: 0.0
  • /fetch/gazebo/wrist_roll_joint/velocity/i: 0.0
  • /fetch/gazebo/wrist_roll_joint/velocity/i_clamp: 0.0
  • /fetch/gazebo/wrist_roll_joint/velocity/p: 100.0
  • /fetch/gripper_controller/gripper_action/centering/d: 0.0
  • /fetch/gripper_controller/gripper_action/centering/i: 0.0
  • /fetch/gripper_controller/gripper_action/centering/i_clamp: 0.0
  • /fetch/gripper_controller/gripper_action/centering/p: 1000.0
  • /fetch/gripper_controller/gripper_action/type: robot_controllers...
  • /fetch/head_camera/crop_decimate/decimation_x: 4
  • /fetch/head_camera/crop_decimate/decimation_y: 4
  • /fetch/head_camera/crop_decimate/queue_size: 1
  • /fetch/head_camera/head_camera_nodelet_manager/num_worker_threads: 2
  • /fetch/head_controller/follow_joint_trajectory/joints: ['head_pan_joint'...
  • /fetch/head_controller/follow_joint_trajectory/type: robot_controllers...
  • /fetch/head_controller/point_head/type: robot_controllers...
  • /fetch/publish_base_scan_raw/lazy: True
  • /fetch/robot/serial: ABCDEFGHIJKLMNOPQ...
  • /fetch/robot/version: 0.0.1
  • /fetch/robot_description: <?xml version="1....
  • /fetch/robot_state_publisher_fetch/publish_frequency: 100.0
  • /fetch/tf_prefix: fetch
  • /fetch/torso_controller/follow_joint_trajectory/joints: ['torso_lift_joint']
  • /fetch/torso_controller/follow_joint_trajectory/type: robot_controllers...
  • /robot_description: <?xml version="1....
  • /rosdistro: kinetic
  • /rosversion: 1.12.14
  • /use_sim_time: True

NODES /fetch/head_camera/ crop_decimate (nodelet/nodelet) head_camera_nodelet_manager (nodelet/nodelet) /fetch/ cmd_vel_mux (topic_tools/mux) fetch_urdf_spawner (gazebo_ros/spawn_model) prepare_robot (fetch_gazebo/prepare_simulated_robot.py) publish_base_scan_raw (topic_tools/relay) robot_state_publisher_fetch (robot_state_publisher/robot_state_publisher) /fetch/head_camera/depth_downsample/ points_downsample (nodelet/nodelet) / gazebo (gazebo_ros/gzserver) gazebo_gui (gazebo_ros/gzclient)

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

setting /run_id to c36e2a96-05ee-11ea-af1d-645d866d6703 process[rosout-1]: started with pid [31508] started core service [/rosout] process[gazebo-2]: started with pid [31532] process[gazebo_gui-3]: started with pid [31537] process[fetch/robot_state_publisher_fetch-4]: started with pid [31542] process[fetch/fetch_urdf_spawner-5]: started with pid [31543] process[fetch/prepare_robot-6]: started with pid [31545] process[fetch/head_camera/head_camera_nodelet_manager-7]: started with pid [31562] process[fetch/head_camera/crop_decimate-8]: started with pid [31573] process[fetch/head_camera/depth_downsample/points_downsample-9]: started with pid [31581] process[fetch/publish_base_scan_raw-10]: started with pid [31582] process[fetch/cmd_vel_mux-11]: started with pid [31585] [ INFO] [1573633363.968230450]: Loading nodelet /fetch/head_camera/crop_decimate of type image_proc/crop_decimate to manager /head_camera/head_camera_nodelet_manager with the following remappings: [ INFO] [1573633363.968283371]: /fetch/head_camera/camera/camera_info -> /fetch/head_camera/depth_registered/camera_info [ INFO] [1573633363.968299604]: /fetch/head_camera/camera/image_raw -> /fetch/head_camera/depth_registered/image_raw [ INFO] [1573633363.968311020]: /fetch/head_camera/camera_out -> /fetch/head_camera/depth_downsample [ INFO] [1573633363.969758065]: waitForService: Service [/head_camera/head_camera_nodelet_manager/load_nodelet] has not been advertised, waiting... [ INFO] [1573633363.983960138]: Loading nodelet /fetch/head_camera/depth_downsample/points_downsample of type depth_image_proc/point_cloud_xyz to manager /head_camera/head_camera_nodelet_manager with the following remappings: [ INFO] [1573633363.984009947]: /fetch/head_camera/depth_downsample/image_rect -> /fetch/head_camera/depth_downsample/image_raw [ INFO] [1573633363.985894670]: waitForService: Service [/head_camera/head_camera_nodelet_manager/load_nodelet] has not been advertised, waiting... [ INFO] [1573633364.009415616]: Initializing nodelet with 2 worker threads. SpawnModel script started [ INFO] [1573633364.302867097]: Finished loading Gazebo ROS API Plugin. [ INFO] [1573633364.303202612]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [ INFO] [1573633364.341493274]: Finished loading Gazebo ROS API Plugin. [ INFO] [1573633364.341824684]: waitForService: Service [/gazebo/set_physics_properties] has not been advertised, waiting... [INFO] [1573633364.407805, 0.000000]: Loading model XML from ros parameter [INFO] [1573633364.410538, 0.000000]: Waiting for service /gazebo/spawn_urdf_model [ INFO] [1573633365.253207415, 0.030000000]: waitForService: Service [/gazebo/set_physics_properties] is now available. [INFO] [1573633365.315970, 0.091000]: Calling service /gazebo/spawn_urdf_model [ INFO] [1573633365.410676271, 0.166000000]: waitForService: Service [/gazebo/set_physics_properties] is now available. [ INFO] [1573633365.602576515, 0.166000000]: Laser Plugin: Using the 'robotNamespace' param: '/fetch/' [ INFO] [1573633365.602611054, 0.166000000]: Starting Laser Plugin (ns = /fetch/) [ INFO] [1573633365.603967636, 0.166000000]: Laser Plugin (ns = /fetch/) <tf_prefix_>, set to "fetch" [INFO] [1573633365.612567, 0.166000]: Spawn status: SpawnModel: Successfully spawned entity [ INFO] [1573633365.626154735, 0.166000000]: Physics dynamic reconfigure ready. [ INFO] [1573633365.630419687, 0.166000000]: Physics dynamic reconfigure ready. [fetch/fetch_urdf_spawner-5] process has finished cleanly log file: /home/saloni/.ros/log/c36e2a96-05ee-11ea-af1d-645d866d6703/fetch-fetch_urdf_spawner-5*.log [ INFO] [1573633365.875143108, 0.166000000]: Camera Plugin: Using the 'robotNamespace' param: '/fetch/' [ INFO] [1573633365.877813894, 0.166000000]: Camera Plugin (ns = /fetch/) <tf_prefix_>, set to "fetch" [ERROR] [1573633365.972400837, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/l_wheel_joint/position [ERROR] [1573633365.972846749, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/l_wheel_joint/velocity [ERROR] [1573633365.973353570, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/r_wheel_joint/position [ERROR] [1573633365.973738457, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/r_wheel_joint/velocity [ERROR] [1573633365.974180265, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/torso_lift_joint/position [ERROR] [1573633365.974559224, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/torso_lift_joint/velocity [ERROR] [1573633365.974979061, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/bellows_joint/position [ERROR] [1573633365.975411184, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/bellows_joint/velocity [ERROR] [1573633365.975860331, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/head_pan_joint/position [ERROR] [1573633365.976270710, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/head_pan_joint/velocity [ERROR] [1573633365.976722179, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/head_tilt_joint/position [ERROR] [1573633365.977114541, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/head_tilt_joint/velocity [ERROR] [1573633365.977562436, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/shoulder_pan_joint/position [ERROR] [1573633365.978003392, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/shoulder_pan_joint/velocity [ERROR] [1573633365.978402277, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/shoulder_lift_joint/position [ERROR] [1573633365.978826419, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/shoulder_lift_joint/velocity [ERROR] [1573633365.979237128, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/upperarm_roll_joint/position [ERROR] [1573633365.979650636, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/upperarm_roll_joint/velocity [ERROR] [1573633365.980045487, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/elbow_flex_joint/position [ERROR] [1573633365.980431692, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/elbow_flex_joint/velocity [ERROR] [1573633365.980812949, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/forearm_roll_joint/position [ERROR] [1573633365.981163072, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/forearm_roll_joint/velocity [ERROR] [1573633365.981512611, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/wrist_flex_joint/position [ERROR] [1573633365.981857964, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/wrist_flex_joint/velocity [ERROR] [1573633365.982223015, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/wrist_roll_joint/position [ERROR] [1573633365.982599420, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/wrist_roll_joint/velocity [ERROR] [1573633365.983004815, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/l_gripper_finger_joint/position [ERROR] [1573633365.983412570, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/l_gripper_finger_joint/velocity [ERROR] [1573633365.983796716, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/r_gripper_finger_joint/position [ERROR] [1573633365.984230458, 0.166000000]: No p gain specified for pid. Namespace: /gazebo/r_gripper_finger_joint/velocity [ WARN] [1573633365.984671619, 0.166000000]: No controllers loaded. [ INFO] [1573633365.985270915, 0.166000000]: Finished initializing FetchGazeboPlugin

Controllers are not loaded from "libfetch_gazebo_plugin.so" which is called from fetch.gazebo.xacro.

I have also tried to add robotNamespace in xacro under the plugin name="fetch_gazebo_plugin" But still facing the same error. Please help to resolve the issue.

Thanks and Regards, Saloni

salonijain12 avatar Nov 13 '19 11:11 salonijain12

Hey bro! I have the similar issue. I found this in the closed issues. https://github.com/fetchrobotics/fetch_gazebo/issues/18 . If you have any possible solution, please let me konw.

gdhucoder avatar Feb 28 '20 09:02 gdhucoder