In Git you can add a submodule to a repository. This is basically a sub-repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:
- Separate big codebases into multiple repositories.
| def compute_reconstruction_statistics(reference_model_path): | |
| # Images w. intrinsics and extrinsics. | |
| with open(os.path.join(reference_model_path, 'cameras.txt'), 'r') as f: | |
| raw_cameras = f.readlines()[3 :] | |
| cameras = {} | |
| for raw_line in raw_cameras: | |
| split_line = raw_line.strip('\n').split(' ') | |
| cameras[int(split_line[0])] = split_line[1 :] | 
| #include <tf/tf.h> | |
| #include <nav_msgs/Odometry.h> | |
| #include <geometry_msgs/Pose2D.h> | |
| ros::Publisher pub_pose_; | |
| void odometryCallback_(const nav_msgs::Odometry::ConstPtr msg) { | |
| geometry_msgs::Pose2D pose2d; | |
| pose2d.x = msg->pose.pose.position.x; | |
| pose2d.y = msg->pose.pose.position.y; |