Skip to content

Commit

Permalink
A few changes, don't really know tbh, nothing important
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacob Gloudemans committed Mar 25, 2019
1 parent 7ed8af0 commit 3172bc2
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 178 deletions.
6 changes: 3 additions & 3 deletions robot_navigation/scripts/pure_pursuit.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#!/usr/bin/env python

# Import ROS packages
import rospy
Expand Down Expand Up @@ -132,8 +132,8 @@ def compute_new_twist(self, new_pose):
rospy.init_node("pure_pursuit")

# Read parameters off server
lin_vel = rospy.get_param("pp_base_lin_vel", default=0.5)
max_lookahead = rospy.get_param("pp_max_lookahead", default=0.05)
lin_vel = rospy.get_param("pp_base_lin_vel", default=0.1)
max_lookahead = rospy.get_param("pp_max_lookahead", default=1.0)

# Create pure pursuit object
pp = PurePursuit(lin_vel, max_lookahead)
Expand Down
162 changes: 0 additions & 162 deletions robot_simulation/rviz/path_tracking_sim.rviz

This file was deleted.

16 changes: 8 additions & 8 deletions robot_simulation/scripts/field_visualization.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#!/usr/bin/env python

# ----------------------------- #
# Subscribes to drive command, Publishes custom motor speeds. #
# ----------------------------- #
# ------------------------------------------------------- #
# Publishes markers for visualizing the competition arena #
# ------------------------------------------------------- #

# Import ROS packages
import rospy
Expand Down Expand Up @@ -75,28 +75,28 @@ def __init__(self, frame_id, pose_array, x_len, y_len, z_len, color_array):
# -- Add walls -- #

# Front
wall_front_pose = [-wall_width, -wall_width, 0, 0, 0, 0, 0]
wall_front_pose = [-wall_width / 2, -wall_width, 0, 0, 0, 0, 0]
wall_front_msg = RectangleMarker("world", wall_front_pose, field_width + (wall_width * 2),
wall_width, wall_height, wall_color)

# Back
wall_back_pose = [-wall_width, field_length, 0, 0, 0, 0, 0]
wall_back_pose = [-wall_width / 2, field_length, 0, 0, 0, 0, 0]
wall_back_msg = RectangleMarker("world", wall_back_pose, field_width + (wall_width * 2),
wall_width, wall_height, wall_color)

# Left
wall_left_pose = [-wall_width, 0, 0, 0, 0, 0, 0]
wall_left_pose = [-wall_width / 2, 0, 0, 0, 0, 0, 0]
wall_left_msg = RectangleMarker("world", wall_left_pose, wall_width,
field_length, wall_height, wall_color)

# Right
wall_right_pose = [field_width, 0, 0, 0, 0, 0, 0]
wall_right_pose = [field_width + (wall_width / 2), 0, 0, 0, 0, 0, 0]
wall_right_msg = RectangleMarker("world", wall_right_pose, wall_width,
field_length, wall_height, wall_color)

# -- Add ground -- #

ground_pose = [-wall_width, -wall_width, 0, 0, 0, 0, 0]
ground_pose = [-wall_width / 2, -wall_width, 0, 0, 0, 0, 0]
ground_msg = RectangleMarker("world", ground_pose, field_width + (wall_width * 2), field_length + (wall_width * 2), 0.001, ground_color)

# Add all the messages to the marker array
Expand Down
17 changes: 17 additions & 0 deletions robot_simulation/urdf/robot_model.urdf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<robot name="test_robot">

<material name="blue">
<color rgba="0 0 0.5 1"/>
</material>

<link name="robot_frame">
<visual>

<geometry>
<mesh filename="package://robot_simulation/cad/full_robot.stl" scale="0.01 0.01 0.01"/>
</geometry>
<origin rpy="1.57075 0.0 0.0" xyz="0.0 0.0 0.5"/>
<material name="blue"/>
</visual>
</link>
</robot>
10 changes: 5 additions & 5 deletions robot_slam/ekf/ArucoEKF.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ def update(self,pose):

def getPose(self):
pose = Pose()
pose.position.x = self.arucoEKF.x[0][0]
pose.position.y = self.arucoEKF.x[1][0]
pose.position.x = 0.0 #self.arucoEKF.x[0][0]
pose.position.y = 0.0 #self.arucoEKF.x[1][0]
pose.position.z = self.arucoEKF.x[2][0]
pose.orientation.x = self.arucoEKF.x[3][0]
pose.orientation.y = self.arucoEKF.x[4][0]
pose.orientation.z = self.arucoEKF.x[5][0]
pose.orientation.w = self.arucoEKF.x[6][0]
pose.orientation.w = 1.0 #self.arucoEKF.x[6][0]

return pose

Expand All @@ -82,9 +82,9 @@ def getPoseCovStamped(self):
self.seqID += 1

poseCovStamped.pose.pose = self.getPose()
poseCovStamped.pose.covariance = self.arucoEKF.P
poseCovStamped.pose.covariance = np.reshape(np.eye(6)*5, (36,)).tolist()

return PoseWithCovarianceStamped()
return poseCovStamped


# Define the Jacobian matrix for measurement update
Expand Down

0 comments on commit 3172bc2

Please sign in to comment.