8 template <
size_t NJOINTS>
11 #ifdef PLOTTING_ENABLED 20 for (
size_t jointId = 0; jointId < NJOINTS; jointId++)
22 std::vector<double> position;
23 std::vector<double> velocity;
24 std::vector<double> time_state;
25 for (
size_t j = 0; j < stateTraj.
getDataArray().size(); j++)
27 position.push_back(stateTraj.
getDataArray()[j](jointId));
28 velocity.push_back(stateTraj.
getDataArray()[j](jointId + 6));
42 }
catch (
const std::exception& e)
44 std::cout << e.what() << std::endl;
47 std::cout <<
"Plotting is disabled." << std::endl;
bool plot(const Eigen::Ref< const Eigen::MatrixXd > &x, const Eigen::Ref< const Eigen::MatrixXd > &y, const std::map< std::string, std::string > &keywords)
void show(bool block=true)
DiscreteArray< T, Alloc > & getDataArray()
void title(const std::string &titlestr)
tpl::TimeArray< SCALAR > & getTimeArray()
void plotResultsTrajectories(const ct::core::StateTrajectory< 2 *NJOINTS > &stateTraj)
Definition: plotResultsTrajectories.h:9
bool subplot(const size_t nrows, const size_t ncols, const size_t plot_number)
bool figure(std::string i="")