Skip to content

Commit 5652369

Browse files
committed
field test
1 parent 878ae79 commit 5652369

File tree

6 files changed

+38
-249
lines changed

6 files changed

+38
-249
lines changed

go2_robot_sdk/config/nav2_params_navigation.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,19 @@ controller_server:
9595
general_goal_checker:
9696
stateful: True
9797
plugin: "nav2_controller::SimpleGoalChecker"
98-
xy_goal_tolerance: 0.25
99-
yaw_goal_tolerance: 0.25
98+
xy_goal_tolerance: 0.4
99+
yaw_goal_tolerance: 0.2
100100
# DWB parameters
101101
FollowPath:
102102
plugin: "dwb_core::DWBLocalPlanner"
103103
debug_trajectory_details: True
104104
min_vel_x: 0.0
105105
min_vel_y: 0.0
106-
max_vel_x: 3.0 #changed
107-
max_vel_y: 0.0
108-
max_vel_theta: 3.0 #changed
106+
max_vel_x: 2.0 #changed
107+
max_vel_y: -1.0
108+
max_vel_theta: 1.0
109109
min_speed_xy: 0.0
110-
max_speed_xy: 3.0 #changed
110+
max_speed_xy: 3.0
111111
min_speed_theta: 0.0
112112
# Add high threshold velocity for turtlebot 3 issue.
113113
# https://github.com/ROBOTIS-GIT/turtlebot3_simulations/issues/75
@@ -124,7 +124,7 @@ controller_server:
124124
linear_granularity: 0.05
125125
angular_granularity: 0.025
126126
transform_tolerance: 0.2
127-
xy_goal_tolerance: 0.3 #changed
127+
xy_goal_tolerance: 0.4
128128
trans_stopped_velocity: 0.25
129129
short_circuit_trajectory_evaluation: True
130130
stateful: True
@@ -151,12 +151,12 @@ local_costmap:
151151
width: 5
152152
height: 5
153153
resolution: 0.05
154-
footprint: "[[-0.25, -0.15], [-0.25, 0.15], [0.25, 0.15], [0.25, -0.15]]"
154+
footprint: "[[-0.30, -0.20], [-0.30, 0.20], [0.30, 0.20], [0.30, -0.20]]"
155155
plugins: ["voxel_layer", "inflation_layer"]
156156
inflation_layer:
157157
plugin: "nav2_costmap_2d::InflationLayer"
158-
cost_scaling_factor: 1.5
159-
inflation_radius: 0.35
158+
cost_scaling_factor: 3.5
159+
inflation_radius: 0.60
160160
voxel_layer:
161161
plugin: "nav2_costmap_2d::VoxelLayer"
162162
enabled: True
@@ -190,7 +190,7 @@ global_costmap:
190190
publish_frequency: 2.0
191191
global_frame: map
192192
robot_base_frame: base_link
193-
footprint: "[[-0.25, -0.15], [-0.25, 0.15], [0.25, 0.15], [0.25, -0.15]]"
193+
footprint: "[[-0.30, -0.20], [-0.30, 0.20], [0.30, 0.20], [0.30, -0.20]]"
194194
width: 100
195195
height: 100
196196
resolution: 0.05
@@ -215,8 +215,8 @@ global_costmap:
215215
map_subscribe_transient_local: True
216216
inflation_layer:
217217
plugin: "nav2_costmap_2d::InflationLayer"
218-
cost_scaling_factor: 1.5
219-
inflation_radius: 0.35
218+
cost_scaling_factor: 3.5
219+
inflation_radius: 0.60
220220
always_send_full_costmap: True
221221

222222
# The yaml_filename does not need to be specified since it going to be set by defaults in launch.
@@ -298,8 +298,8 @@ velocity_smoother:
298298
smoothing_frequency: 20.0
299299
scale_velocities: False
300300
feedback: "OPEN_LOOP"
301-
max_velocity: [0.5, 0.0, 1.0]
302-
min_velocity: [-0.5, 0.0, -1.0]
301+
max_velocity: [0.5, 0.0, 1.5]
302+
min_velocity: [-0.5, 0.0, -1.5]
303303
max_accel: [1.5, 0.0, 2.0]
304304
max_decel: [-1.5, 0.0, -2.0]
305305
odom_topic: "odom"

go2_robot_sdk/go2_robot_sdk/initial_pose_pub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def __init__(self):
1111
def publish_pose(self):
1212
msg = PoseWithCovarianceStamped()
1313
msg.header.frame_id = 'map'
14-
msg.pose.pose.position.x = -1.0
15-
msg.pose.pose.position.y = 0.0
14+
msg.pose.pose.position.x = 0.0
15+
msg.pose.pose.position.y = -1.0
1616
msg.pose.pose.orientation.z = 0.0
1717
msg.pose.pose.orientation.w = 1.0
1818
msg.pose.covariance = [0.0] * 36

go2_robot_sdk/go2_robot_sdk/sequential_nav_test.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,16 +56,25 @@ def send_goal(self, pose):
5656
return True
5757

5858
def run_sequence(self):
59-
#Forward 2 meters
60-
self.send_goal(self.make_pose(1.0, 0.0, 0.0))
61-
62-
#Rotate 180 degrees in place
63-
self.send_goal(self.make_pose(1.0, 0.0, math.pi))
64-
65-
time.sleep(2.0)
66-
67-
#return 2 meters
68-
self.send_goal(self.make_pose(0.0, 0.0, math.pi))
59+
i = 0
60+
for i in range (0,2):
61+
self.send_goal(self.make_pose(-1.61775, 17.2127, 1.70432)) #main entrance
62+
time.sleep(1.0)
63+
self.send_goal(self.make_pose(9.57915, 19.4981, -1.21812)) #front main entrance
64+
time.sleep(1.0)
65+
self.send_goal(self.make_pose(-1.61775, 17.2127, 2.36622)) #main entrance
66+
time.sleep(1.0)
67+
self.send_goal(self.make_pose(2.27953, -1.53849, -1.41637)) #second hall
68+
time.sleep(1.0)
69+
self.send_goal(self.make_pose(12.5844, 1.70121, -1.21812)) #front second entrance
70+
time.sleep(1.0)
71+
self.send_goal(self.make_pose(2.27953, -1.53849, 2.36622)) #second hall
72+
time.sleep(1.0)
73+
74+
75+
#self.send_goal(self.make_pose(20.0, 20.0, math.pi))
76+
#time.sleep(1.0)
77+
#self.send_goal(self.make_pose(15.0, 15.0, math.pi))
6978

7079
def main():
7180
rclpy.init()
@@ -75,3 +84,4 @@ def main():
7584
if __name__ == '__main__':
7685
main()
7786

87+

go2_robot_sdk/launch/2_custom_robot.launch.py

Lines changed: 0 additions & 221 deletions
This file was deleted.

go2_robot_sdk/map/office.pgm

1.68 KB
Binary file not shown.

go2_robot_sdk/map/office.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
image: office.pgm
22
mode: trinary
33
resolution: 0.050
4-
origin: [-1.709, -1.498, 0]
4+
origin: [-6.633, -6.401, 0]
55
negate: 0
66
occupied_thresh: 0.65
77
free_thresh: 0.196

0 commit comments

Comments
 (0)