bitsim
Model, simulate, estimate and control robots in C++
Loading...
Searching...
No Matches
print_utils.cpp File Reference
#include "bitsim/utils/io/print_utils.h"
#include <cmath>
#include <iomanip>
#include <iostream>
#include <sstream>
Include dependency graph for print_utils.cpp:

Namespaces

namespace  bitsim
namespace  bitsim::utils
namespace  bitsim::utils::io

Functions

real_t bitsim::utils::io::clean (real_t x, real_t zero=5.0e-4)
 x, or 0 when \(|x| <\) zero
void bitsim::utils::io::print_title (const std::string &title, std::ostream &out)
 An empty line and then the title.
void bitsim::utils::io::print_title (const std::string &title)
void bitsim::utils::io::print_number (const std::string &label, real_t value, int width=26)
 The label and the value, with 3 decimals.
void bitsim::utils::io::print_flag (const std::string &label, bool value, int width=26)
 The label and true or false.
void bitsim::utils::io::print_error (const std::string &label, real_t value, int width=26)
 The label and the value in scientific notation with one decimal, for small errors.
void bitsim::utils::io::print_value (const std::string &label, real_t value, const std::string &unit, int precision=3, int width=30)
 The label, the value right-aligned with the given decimals, and the unit.
std::string bitsim::utils::io::to_string (const chrono::ChVector3d &v)
 "(x, y, z)" with 3 decimals
void bitsim::utils::io::print_vector (const std::string &label, const chrono::ChVector3d &v, int width=26)
 The label and the vector as "(x, y, z)".
void bitsim::utils::io::print_matrix (const std::string &label, const chrono::ChMatrix33d &R)
 The label on a line of its own, then the three rows of the matrix.
void bitsim::utils::io::print_frame (const std::string &label, const chrono::ChFrame<> &frame, int width=14)
 The label, the origin of the frame and its three axes, as seen from its parent: the columns of its rotation matrix.
std::ostream & bitsim::operator<< (std::ostream &out, const Null &)
 Write "null" for the Null placeholder. It is in namespace bitsim, with Null, so that argument-dependent lookup finds it.