Skip to content

Commit

Permalink
Minor changes from the last week of feedback (ouster-lidar#195)
Browse files Browse the repository at this point in the history
* Make location of ROS build instructions more prominent in README
* Minor typo and formatting fixes in the README
* Avoid spurious git error messages when building outside a git repo
  • Loading branch information
dmitrig authored Dec 11, 2020
1 parent 9352730 commit 5c00aa9
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 13 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Changelog
=========

[20201202]
[20201209]
==========

Changed
Expand Down
23 changes: 12 additions & 11 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ Ouster Example Code
Summary
=======

Sample code for connecting to and configuring ouster sensors, reading and visualizing data, and
interfacing with ROS.
To get started building the client and visualizer libraries, see the `Sample Client and Visualizer`_
section below. For instructions on ROS, start with the `Example ROS Code`_ section.

This repository contains sample code for connecting to and configuring ouster sensors, reading and
visualizing data, and interfacing with ROS.

* `ouster_client <ouster_client/>`_ contains an example C++ client for ouster sensors
* `ouster_viz <ouster_viz/>`_ contains a basic point cloud visualizer
* `ouster_ros <ouster_ros/>`_ contains example ROS nodes for publishing point cloud messages

To get started building the client and visualizer libraries, see the ``Building`` section below. For
instructions on ROS, start with the ``ROS`` section.


Sample Client and Visualizer
============================
Expand Down Expand Up @@ -69,10 +69,8 @@ for dependencies. Follow the official documentation to set up your build environ
* `Vcpkg, at tag "2020.07" installed and integrated with Visual Studio
<https://docs.microsoft.com/en-us/cpp/build/vcpkg?view=msvc-160#installation>`_

.. note::

You'll need to run ``git checkout 2020.07`` in the vcpkg directory before bootstrapping to use
the correct versions of the dependencies. Building may fail unexpectedly if you skip this step.
**Note** You'll need to run ``git checkout 2020.07`` in the vcpkg directory before bootstrapping to
use the correct versions of the dependencies. Building may fail unexpectedly if you skip this step.

Don't forget to integrate vcpkg with Visual Studio after bootstrapping::

Expand Down Expand Up @@ -128,7 +126,8 @@ Navigate to ``ouster_viz`` under the build directory, which should contain an ex
where ``<sensor hostname>`` can be the hostname (os-99xxxxxxxxxx) or IP of the sensor and ``<udp
data destingation>`` is the hostname or IP to which the sensor should send lidar data.

For usage and other options, run ``./simple_viz -h`` Mouse controls:
The sample visualizer does not currently include a GUI, but can be controlled with the mouse and
keyboard:

* Click and drag rotates the view
* Middle click and drag moves the view
Expand Down Expand Up @@ -161,6 +160,8 @@ Keyboard controls:
``shift`` Camera Translation with mouse drag
============= ============================================

For usage and other options, run ``./simple_viz -h``


Example ROS Code
================
Expand Down Expand Up @@ -233,7 +234,7 @@ Recording Data
To record raw sensor output use `rosbag record`_. After starting the ``roslaunch`` command above, in
another terminal, run::

rosbag record /os_node/imu_packets /os_node/lidar_packets`
rosbag record /os_node/imu_packets /os_node/lidar_packets

This will save a bag file of recorded data in the current working directory.

Expand Down
1 change: 1 addition & 0 deletions cmake/VersionGen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if(GIT_FOUND)
COMMAND ${GIT_EXECUTABLE} describe --always --match none --dirty
OUTPUT_VARIABLE GIT_OUTPUT
RESULT_VARIABLE GIT_RESULT
ERROR_QUIET
WORKING_DIRECTORY ${VERSION_GEN_SOURCE_DIR})

if(${GIT_RESULT} EQUAL 0)
Expand Down
6 changes: 5 additions & 1 deletion ouster_client/include/ouster/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ enum timestamp_mode {
TIME_FROM_PTP_1588
};

enum configuration_version {
FW_2_0 = 3
};

struct data_format {
uint32_t pixels_per_column;
uint32_t columns_per_packet;
Expand Down Expand Up @@ -103,7 +107,7 @@ uint32_t n_cols_of_lidar_mode(lidar_mode mode);

/**
* Get the lidar rotation frequency from lidar mode.
*
*
* @param lidar_mode
* @return lidar rotation frequency in Hz
*/
Expand Down
2 changes: 2 additions & 0 deletions ouster_client/src/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@ bool collect_metadata(client& cli, SOCKET sock_fd, chrono::seconds timeout) {
cli.meta["lidar_mode"] = root["lidar_mode"];
cli.meta["client_version"] = ouster::CLIENT_VERSION;

cli.meta["json_calibration_version"] = FW_2_0;

return success;
}
} // namespace
Expand Down
2 changes: 2 additions & 0 deletions ouster_client/src/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,8 @@ std::string to_string(const sensor_info& info) {
}
}

root["json_calibration_version"] = FW_2_0;

Json::StreamWriterBuilder builder;
builder["enableYAMLCompatibility"] = true;
builder["precision"] = 6;
Expand Down

0 comments on commit 5c00aa9

Please sign in to comment.