From 31f7e1d193db7985387a4a6449b491b7d563f430 Mon Sep 17 00:00:00 2001 From: tanacchi Date: Fri, 25 Oct 2019 15:11:40 +0900 Subject: [PATCH 01/12] Use namespace group for controller-spawning --- rois_gazebo/config/controller.yaml | 89 +++++++++++++------------- rois_gazebo/launch/setup_gazebo.launch | 33 +++++----- 2 files changed, 59 insertions(+), 63 deletions(-) diff --git a/rois_gazebo/config/controller.yaml b/rois_gazebo/config/controller.yaml index d9ae1756..0c663c23 100644 --- a/rois_gazebo/config/controller.yaml +++ b/rois_gazebo/config/controller.yaml @@ -1,46 +1,45 @@ -roisbot: - joint_state_controller: - type: joint_state_controller/JointStateController - publish_rate: 50 +joint_state_controller: + type: joint_state_controller/JointStateController + publish_rate: 50 - diff_drive_controller: - type : "diff_drive_controller/DiffDriveController" - left_wheel : 'left_wheel_joint' - right_wheel : 'right_wheel_joint' - pose_covariance_diagonal : [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0] - twist_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0] - - # Wheel separation and diameter. These are both optional. - # diff_drive_controller will attempt to read either one or both from the - # URDF if not specified as a parameter - wheel_separation : 0.3 - wheel_radius : 0.1 - - # Wheel separation and radius multipliers - wheel_separation_multiplier: 1.0 # default: 1.0 - wheel_radius_multiplier : 1.0 # default: 1.0 - - # Velocity commands timeout [s], default 0.5 - cmd_vel_timeout: 1.0 - - # Base frame_id - base_frame_id: base_footprint #default: base_link - - # Velocity and acceleration limits - # Whenever a min_* is unspecified, default to -max_* - linear: - x: - has_velocity_limits : true - max_velocity : 2.0 # m/s - min_velocity : -2.0 # m/s - has_acceleration_limits: true - max_acceleration : 2.0 # m/s^2 - min_acceleration : -2.0 # m/s^2 - angular: - z: - has_velocity_limits : true - max_velocity : 1.0 # rad/s - min_velocity : -1.0 - has_acceleration_limits: true - max_acceleration : 1.0 # rad/s^2 - min_acceleration : -1.0 +diff_drive_controller: + type : "diff_drive_controller/DiffDriveController" + left_wheel : 'left_wheel_joint' + right_wheel : 'right_wheel_joint' + pose_covariance_diagonal : [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0] + twist_covariance_diagonal: [0.001, 0.001, 1000000.0, 1000000.0, 1000000.0, 1000.0] + + # Wheel separation and diameter. These are both optional. + # diff_drive_controller will attempt to read either one or both from the + # URDF if not specified as a parameter + wheel_separation : 0.3 + wheel_radius : 0.1 + + # Wheel separation and radius multipliers + wheel_separation_multiplier: 1.0 # default: 1.0 + wheel_radius_multiplier : 1.0 # default: 1.0 + + # Velocity commands timeout [s], default 0.5 + cmd_vel_timeout: 1.0 + + # Base frame_id + base_frame_id: base_footprint #default: base_link + + # Velocity and acceleration limits + # Whenever a min_* is unspecified, default to -max_* + linear: + x: + has_velocity_limits : true + max_velocity : 2.0 # m/s + min_velocity : -2.0 # m/s + has_acceleration_limits: true + max_acceleration : 2.0 # m/s^2 + min_acceleration : -2.0 # m/s^2 + angular: + z: + has_velocity_limits : true + max_velocity : 1.0 # rad/s + min_velocity : -1.0 + has_acceleration_limits: true + max_acceleration : 1.0 # rad/s^2 + min_acceleration : -1.0 diff --git a/rois_gazebo/launch/setup_gazebo.launch b/rois_gazebo/launch/setup_gazebo.launch index 8b2b02db..e6b848ae 100644 --- a/rois_gazebo/launch/setup_gazebo.launch +++ b/rois_gazebo/launch/setup_gazebo.launch @@ -15,33 +15,30 @@ value="$(arg world_name)" /> - - - - - - + + + + + Date: Fri, 25 Oct 2019 15:55:38 +0900 Subject: [PATCH 02/12] Split model_spawner by namespace --- rois_gazebo/launch/setup_gazebo.launch | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/rois_gazebo/launch/setup_gazebo.launch b/rois_gazebo/launch/setup_gazebo.launch index e6b848ae..03bbca65 100644 --- a/rois_gazebo/launch/setup_gazebo.launch +++ b/rois_gazebo/launch/setup_gazebo.launch @@ -18,26 +18,29 @@ - - - + + output="screen"> + + + + + Date: Fri, 25 Oct 2019 16:22:17 +0900 Subject: [PATCH 03/12] Split launch file to spawn robot --- rois_gazebo/launch/setup_gazebo.launch | 35 ++++++-------------------- rois_gazebo/launch/spawn_robot.launch | 35 ++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 27 deletions(-) create mode 100644 rois_gazebo/launch/spawn_robot.launch diff --git a/rois_gazebo/launch/setup_gazebo.launch b/rois_gazebo/launch/setup_gazebo.launch index 03bbca65..3a675ed6 100644 --- a/rois_gazebo/launch/setup_gazebo.launch +++ b/rois_gazebo/launch/setup_gazebo.launch @@ -15,33 +15,14 @@ value="$(arg world_name)" /> - - - - - - - - - - - + + + + + + + + + + + + + + + + + + -- GitLab From e919c8b6bf41ddfc53588497f3190f8908143457 Mon Sep 17 00:00:00 2001 From: tanacchi Date: Fri, 25 Oct 2019 16:34:45 +0900 Subject: [PATCH 04/12] Add argument to teleop launcher --- rois_gazebo/launch/teleop_keyboard.launch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rois_gazebo/launch/teleop_keyboard.launch b/rois_gazebo/launch/teleop_keyboard.launch index ad051e88..467546c3 100644 --- a/rois_gazebo/launch/teleop_keyboard.launch +++ b/rois_gazebo/launch/teleop_keyboard.launch @@ -1,5 +1,6 @@ + + to="/$(arg robot_name)/diff_drive_controller/cmd_vel" /> -- GitLab From aa0deb076c0b5bbbc6707bc9cbce5d6a5bc95ad6 Mon Sep 17 00:00:00 2001 From: tanacchi Date: Tue, 29 Oct 2019 10:38:42 +0900 Subject: [PATCH 05/12] Add robot_name param to setup_gazebo launcher --- rois_gazebo/launch/setup_gazebo.launch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rois_gazebo/launch/setup_gazebo.launch b/rois_gazebo/launch/setup_gazebo.launch index 3a675ed6..adbb6567 100644 --- a/rois_gazebo/launch/setup_gazebo.launch +++ b/rois_gazebo/launch/setup_gazebo.launch @@ -8,6 +8,9 @@ + + value="$(arg robot_name)" /> -- GitLab From c872c599eb2d85e86085b1dccecbb9d831ad7fbc Mon Sep 17 00:00:00 2001 From: tanacchi Date: Tue, 29 Oct 2019 10:39:09 +0900 Subject: [PATCH 06/12] Remove unnecessary white space --- rois_gazebo/launch/spawn_robot.launch | 41 ++++++++++++++------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/rois_gazebo/launch/spawn_robot.launch b/rois_gazebo/launch/spawn_robot.launch index 7b2b4054..7ae76564 100644 --- a/rois_gazebo/launch/spawn_robot.launch +++ b/rois_gazebo/launch/spawn_robot.launch @@ -1,35 +1,38 @@ - - - + + - - - -- GitLab From 552a6beabe7efd3a3e363ad8a9f8ec31f26bd71c Mon Sep 17 00:00:00 2001 From: tanacchi Date: Tue, 29 Oct 2019 10:59:23 +0900 Subject: [PATCH 07/12] Fix usage of property on xacro file --- rois_description/robot/roisbot.urdf.xacro | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/rois_description/robot/roisbot.urdf.xacro b/rois_description/robot/roisbot.urdf.xacro index b201f413..01f4b7a3 100644 --- a/rois_description/robot/roisbot.urdf.xacro +++ b/rois_description/robot/roisbot.urdf.xacro @@ -1,12 +1,12 @@ - - - - - - - + + + + + + + -- GitLab From fdf6e6820864a3754c7d2d611e04d6e3d9cce6f8 Mon Sep 17 00:00:00 2001 From: tanacchi Date: Tue, 29 Oct 2019 11:18:33 +0900 Subject: [PATCH 08/12] Chane default value of robot_name --- rois_gazebo/launch/setup_gazebo.launch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rois_gazebo/launch/setup_gazebo.launch b/rois_gazebo/launch/setup_gazebo.launch index adbb6567..613bedee 100644 --- a/rois_gazebo/launch/setup_gazebo.launch +++ b/rois_gazebo/launch/setup_gazebo.launch @@ -10,7 +10,7 @@ default="$(find rois_description)/world/c_corridor.sdf" /> + default="roisbot" /> Date: Tue, 29 Oct 2019 11:46:35 +0900 Subject: [PATCH 09/12] Include robot_description param into robot-namespace --- rois_gazebo/launch/spawn_robot.launch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/rois_gazebo/launch/spawn_robot.launch b/rois_gazebo/launch/spawn_robot.launch index 7ae76564..e4ce8e97 100644 --- a/rois_gazebo/launch/spawn_robot.launch +++ b/rois_gazebo/launch/spawn_robot.launch @@ -5,11 +5,11 @@ - + @@ -33,6 +33,6 @@ pkg="gazebo_ros" type="spawn_model" name="spawn_urdf" - args="-urdf -model $(arg robot_name) -param /robot_description" /> + args="-urdf -model $(arg robot_name) -param robot_description" /> -- GitLab From a5074fcbeda233710151c1d9cc039e79ae42616e Mon Sep 17 00:00:00 2001 From: tanacchi Date: Tue, 29 Oct 2019 12:14:25 +0900 Subject: [PATCH 10/12] Add specific urdf file for multiple robot --- rois_description/robot/robot1.urdf.xacro | 234 +++++++++++++++++++++++ 1 file changed, 234 insertions(+) create mode 100644 rois_description/robot/robot1.urdf.xacro diff --git a/rois_description/robot/robot1.urdf.xacro b/rois_description/robot/robot1.urdf.xacro new file mode 100644 index 00000000..29c6347e --- /dev/null +++ b/rois_description/robot/robot1.urdf.xacro @@ -0,0 +1,234 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + transmission_interface/SimpleTransmission + + hardware_interface/VelocityJointInterface + + + hardware_interface/VelocityJointInterface + 15 + + + + transmission_interface/SimpleTransmission + + hardware_interface/VelocityJointInterface + + + hardware_interface/VelocityJointInterface + 15 + + + + + + + + + + + + + + + + + + + + + + Gazebo/Blue + false + + 0.2 0 0 0 0 0 + true + 40 + + + + 500 + 1 + -${M_PI*3/4} + ${M_PI*3/4} + + + + 0.20 + 131 + 0.01 + + + + /scan + lrf_link + 0.9 + 130 + + + + + + + + robot1 + + + + + true + Gazebo/White + + + + + + true + Gazebo/Green + + + + + + true + Gazebo/Red + + + + + + true + Gazebo/Black + + + + + -- GitLab From ee19d28e2c4fe949ad51f0dbb3ee0659cf859350 Mon Sep 17 00:00:00 2001 From: tanacchi Date: Tue, 29 Oct 2019 12:17:11 +0900 Subject: [PATCH 11/12] Modify to read specific urdf file --- rois_gazebo/launch/setup_gazebo.launch | 8 ++++---- rois_gazebo/launch/spawn_robot.launch | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/rois_gazebo/launch/setup_gazebo.launch b/rois_gazebo/launch/setup_gazebo.launch index 613bedee..29660266 100644 --- a/rois_gazebo/launch/setup_gazebo.launch +++ b/rois_gazebo/launch/setup_gazebo.launch @@ -1,16 +1,16 @@ + + default="$(find rois_description)/robot/$(arg robot_name).urdf.xacro" /> - + default="$(find rois_description)/robot/$(arg robot_name).urdf.xacro" /> Date: Tue, 29 Oct 2019 12:25:48 +0900 Subject: [PATCH 12/12] Add arguments of initial position --- rois_gazebo/launch/setup_gazebo.launch | 6 ++++++ rois_gazebo/launch/spawn_robot.launch | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/rois_gazebo/launch/setup_gazebo.launch b/rois_gazebo/launch/setup_gazebo.launch index 29660266..e47afbfb 100644 --- a/rois_gazebo/launch/setup_gazebo.launch +++ b/rois_gazebo/launch/setup_gazebo.launch @@ -25,6 +25,12 @@ + + + + + + + args="-urdf -model $(arg robot_name) -param robot_description $(arg init_pos)" /> -- GitLab