diff --git a/dense_map/geometry_mapper/tools/get_depth_data_from_mesh.cc b/dense_map/geometry_mapper/tools/get_depth_data_from_mesh.cc index d7b5f2d8..4a94283f 100644 --- a/dense_map/geometry_mapper/tools/get_depth_data_from_mesh.cc +++ b/dense_map/geometry_mapper/tools/get_depth_data_from_mesh.cc @@ -52,7 +52,7 @@ int main(int argc, char** argv) { "Directory containing groundtruth poses with timestamps as filenames.")( "mesh", po::value()->required(), "Mesh used to provide depth data.")( "config-path,c", po::value()->required(), "Path to astrobee config directory.")( - "robot-config-file,r", po::value(&robot_config_file)->default_value("config/robots/bumble.config"), + "robot-config-file,r", po::value(&robot_config_file)->default_value("bumble.config"), "Robot config file")("world,w", po::value(&world)->default_value("iss"), "World name")( "output-file,o", po::value(&output_file)->default_value("depths.csv"), "Output file containing timestamp, depth, x, y values on each line. Timestamps for which depth data was not " @@ -84,7 +84,6 @@ int main(int argc, char** argv) { const std::string sensor_rays_file = vm["sensor-rays-file"].as(); const std::string groundtruth_directory = vm["groundtruth-directory"].as(); const std::string mesh_file = vm["mesh"].as(); - const std::string config_path = vm["config-path"].as(); // Only pass program name to free flyer so that boost command line options // are ignored when parsing gflags. @@ -104,7 +103,7 @@ int main(int argc, char** argv) { LOG(FATAL) << "Mesh " << mesh_file << " not found."; } - lc::SetEnvironmentConfigs(config_path, world, robot_config_file); + lc::SetEnvironmentConfigs(world, robot_config_file); config_reader::ConfigReader config; config.AddFile("geometry.config"); if (!config.ReadFiles()) { diff --git a/pano/docker/pano.Dockerfile b/pano/docker/pano.Dockerfile index 49f1c28b..ea986cd4 100644 --- a/pano/docker/pano.Dockerfile +++ b/pano/docker/pano.Dockerfile @@ -14,16 +14,19 @@ RUN apt-get update \ hugin \ libvips-tools \ python3-pip \ + gfortran libopenblas-dev libfftw3-dev \ && rm -rf /var/lib/apt/lists/* # pandas: pulled in as pyshtools dependency but install breaks if not mentioned explicitly (?) # pyshtools: used during Pannellum multires generation # snakemake: modern build system based on Python, manages stitching workflows -RUN pip3 install --no-cache-dir --upgrade pip \ - && pip3 install --no-cache-dir \ - pandas \ - pyshtools \ - snakemake + +# Install Jupyter explicitly first +RUN pip3 install --no-cache-dir --upgrade pip && \ + pip3 install --no-cache-dir jupyter + +# Install other Python packages: jupyter package needs to be installed before attempting to build pyshtools +RUN pip3 install --no-cache-dir pandas pyshtools snakemake pulp==2.7 --ignore-installed PyYAML # pannellum: library for viewing/navigating panorama tours RUN mkdir -p /opt \ diff --git a/pano/pano_stitch/scripts/pano_image_meta.py b/pano/pano_stitch/scripts/pano_image_meta.py index cd971636..b20934cd 100755 --- a/pano/pano_stitch/scripts/pano_image_meta.py +++ b/pano/pano_stitch/scripts/pano_image_meta.py @@ -26,7 +26,7 @@ import rosbag from tf.transformations import euler_from_quaternion -IMAGE_TOPIC = "/hw/cam_sci/compressed" +IMAGE_TOPIC = ["/hw/cam_sci/compressed", "/hw/cam_sci_info"] POSE_TOPIC = "/loc/pose" FIELD_NAMES = ( "timestamp", @@ -50,8 +50,9 @@ def get_image_meta(inbag_path, num_images=None): images = [] with rosbag.Bag(inbag_path) as bag: img_meta = None - for topic, msg, t in bag.read_messages([IMAGE_TOPIC, POSE_TOPIC]): - if topic == IMAGE_TOPIC: + topics = IMAGE_TOPIC + [POSE_TOPIC] + for topic, msg, t in bag.read_messages(topics): + if topic in IMAGE_TOPIC: if num_images is not None and len(images) == num_images: break diff --git a/pano/pano_stitch/scripts/stitch_panorama.py b/pano/pano_stitch/scripts/stitch_panorama.py index f19446b4..f30ff5b5 100755 --- a/pano/pano_stitch/scripts/stitch_panorama.py +++ b/pano/pano_stitch/scripts/stitch_panorama.py @@ -427,12 +427,26 @@ def next(self): def read_pto(pano, pto_path): print("\nread_pto: %s" % pto_path) - pano.ReadPTOFile(pto_path) + # Accomodate hugin changing API + try: + # Attempt the first method + ifs = hsi.ifstream(pto_path) + pano.readData(ifs) + except AttributeError: + # Fallback to the second method if the first method fails + pano.ReadPTOFile(pto_path) def write_pto(pano, pto_path): print("\nwrite_pto: %s" % pto_path) - pano.WritePTOFile(pto_path) + # Accomodate hugin changing API + try: + # Attempt the first method + ofs = hsi.ofstream(pto_path) + pano.writeData(ofs) + except AttributeError: + # Fallback to the second method if the first method fails + pano.WritePTOFile(pto_path) def get_timestamp():