Skip to content

Commit

Permalink
cleaned up more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoussan committed Jun 7, 2024
1 parent 348d0a5 commit a073567
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,29 +33,8 @@
#include <vector>

namespace localization_analysis {
// TODO(rsoussan): put these somewhere else!
/*using Calibration = gtsam::Cal3_S2;
using Camera = gtsam::PinholePose<Calibration>;
using SmartFactor = gtsam::RobustSmartProjectionPoseFactor<Calibration>;
void FeatureTrackImage(const graph_localizer::FeatureTrackIdMap& feature_tracks,
const camera::CameraParameters& camera_params, cv::Mat& feature_track_image);
void MarkSmartFactorPoints(const std::vector<const SmartFactor*> smart_factors,
const camera::CameraParameters& camera_params, const double feature_track_min_separation,
const int max_num_factors, cv::Mat& feature_track_image);
boost::optional<sensor_msgs::ImagePtr> CreateFeatureTrackImage(
const sensor_msgs::ImageConstPtr& image_msg, const graph_localizer::FeatureTrackIdMap& feature_tracks,
const camera::CameraParameters& camera_params, const std::vector<const SmartFactor*>& smart_factors = {});
cv::Point2f Distort(const Eigen::Vector2d& undistorted_point, const camera::CameraParameters& params);
std::vector<const SmartFactor*> SmartFactors(const graph_localizer::GraphLocalizer& graph);
*/
bool string_ends_with(const std::string& str, const std::string& ending);
/*
void SaveImuBiasTesterPredictedStates(
const std::vector<localization_common::CombinedNavState>& imu_bias_tester_predicted_states, rosbag::Bag& bag);
*/

template <typename MsgType>
void SaveMsg(const MsgType& msg, const std::string& topic, rosbag::Bag& bag) {
const ros::Time timestamp = localization_common::RosTimeFromHeader(msg.header);
Expand Down
2 changes: 1 addition & 1 deletion tools/localization_analysis/scripts/config_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def fill_in_values(original_config, value_map, new_config):
def make_value_map(values, value_names):
value_map = {}
if len(values) != len(value_names):
print("values and value_names not same length!")
print("Values and value_names not the same length.")
exit()

for index, value_name in enumerate(value_names):
Expand Down
8 changes: 0 additions & 8 deletions tools/localization_analysis/scripts/plot_conversions.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

# Return list of 3 lists, one each for x, y, z values in poses
def xyz_vectors_from_poses(poses):
# TODO: Do this more efficiently
xs = [pose.position.x for pose in poses]
ys = [pose.position.y for pose in poses]
zs = [pose.position.z for pose in poses]
Expand All @@ -40,7 +39,6 @@ def xyz_vectors_from_poses(poses):

# Return list of 3 lists, one each for y, p, r values in poses
def ypr_vectors_from_poses(poses):
# TODO: Do this more efficiently
ys = [euler_angles[0] for euler_angles in (pose.euler_angles() for pose in poses)]
ps = [euler_angles[1] for euler_angles in (pose.euler_angles() for pose in poses)]
rs = [euler_angles[2] for euler_angles in (pose.euler_angles() for pose in poses)]
Expand All @@ -49,7 +47,6 @@ def ypr_vectors_from_poses(poses):

# Return list of 3 lists, one each for x, y, z values in velocities
def xyz_velocity_vectors_from_graph_vio_states(graph_vio_states):
# TODO: Do this more efficiently
xs = [state.velocity_with_covariance.x for state in graph_vio_states]
ys = [state.velocity_with_covariance.y for state in graph_vio_states]
zs = [state.velocity_with_covariance.z for state in graph_vio_states]
Expand All @@ -58,7 +55,6 @@ def xyz_velocity_vectors_from_graph_vio_states(graph_vio_states):

# Return list of 3 lists, one each for x, y, z values in velocities
def xyz_velocity_vectors_from_extrapolated_loc_states(extrapolated_loc_states):
# TODO: Do this more efficiently
xs = [state.velocity.x for state in extrapolated_loc_states]
ys = [state.velocity.y for state in extrapolated_loc_states]
zs = [state.velocity.z for state in extrapolated_loc_states]
Expand All @@ -67,7 +63,6 @@ def xyz_velocity_vectors_from_extrapolated_loc_states(extrapolated_loc_states):

# Return list of 3 lists, one each for x, y, z values in accelerations
def xyz_acceleration_vectors_from_extrapolated_loc_states(extrapolated_loc_states):
# TODO: Do this more efficiently
xs = [state.acceleration.x for state in extrapolated_loc_states]
ys = [state.acceleration.y for state in extrapolated_loc_states]
zs = [state.acceleration.z for state in extrapolated_loc_states]
Expand All @@ -76,7 +71,6 @@ def xyz_acceleration_vectors_from_extrapolated_loc_states(extrapolated_loc_state

# Return list of 3 lists, one each for x, y, z values in accelerations
def xyz_acceleration_vectors_from_imu_accelerations(imu_accelerations):
# TODO: Do this more efficiently
xs = [acceleration.x for acceleration in imu_accelerations]
ys = [acceleration.y for acceleration in imu_accelerations]
zs = [acceleration.z for acceleration in imu_accelerations]
Expand All @@ -87,7 +81,6 @@ def xyz_acceleration_vectors_from_imu_accelerations(imu_accelerations):

# Return list of 3 lists, one each for x, y, z values in IMU accelerometer bias
def xyz_accel_bias_vectors_from_graph_vio_states(graph_vio_states):
# TODO: Do this more efficiently
xs = [
state.imu_bias_with_covariance.accelerometer_bias.x
for state in graph_vio_states
Expand All @@ -105,7 +98,6 @@ def xyz_accel_bias_vectors_from_graph_vio_states(graph_vio_states):

# Return list of 3 lists, one each for x, y, z values in IMU gyro bias
def xyz_gyro_bias_vectors_from_graph_vio_states(graph_vio_states):
# TODO: Do this more efficiently
xs = [state.imu_bias_with_covariance.gyroscope_bias.x for state in graph_vio_states]
ys = [state.imu_bias_with_covariance.gyroscope_bias.y for state in graph_vio_states]
zs = [state.imu_bias_with_covariance.gyroscope_bias.z for state in graph_vio_states]
Expand Down

0 comments on commit a073567

Please sign in to comment.