Skip to content

Commit

Permalink
Added compatibility of robot-utils with dynamic-graph logger
Browse files Browse the repository at this point in the history
  • Loading branch information
fbailly authored and olivier-stasse committed Jan 31, 2019
1 parent b779239 commit 4d342e6
Show file tree
Hide file tree
Showing 2 changed files with 483 additions and 471 deletions.
31 changes: 20 additions & 11 deletions include/sot/core/robot-utils.hh
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ namespace dynamicgraph {
};

struct SOT_CORE_EXPORT RobotUtil
{
public:
{
public:

RobotUtil();

Expand Down Expand Up @@ -241,17 +241,26 @@ struct SOT_CORE_EXPORT RobotUtil
const JointLimits & get_joint_limits_from_id(Index id);
JointLimits cp_get_joint_limits_from_id(Index id);


void sendMsg(const std::string& msg,
MsgType t=MSG_TYPE_INFO,
const char* file="", int line=0)
{
getLogger().sendMsg("[FromURDFToSoT] "+msg, t, file, line);
}
/** \name Logger related methods */
/** \{*/
/// \brief Send messages \param msg with level t. Add string file and line to message.
void sendMsg(const std::string &msg,
MsgType t=MSG_TYPE_INFO,
const char *file="",
int line=0);

/// \brief Specify the verbosity level of the logger.
void setLoggerVerbosityLevel(LoggerVerbosity lv)
{logger_.setVerbosity(lv);}

/// \brief Get the logger's verbosity level.
LoggerVerbosity getLoggerVerbosityLevel()
{ return logger_.getVerbosity(); };

void display(std::ostream &os) const;

}; // struct RobotUtil
protected:
Logger logger_;
}; // struct RobotUtil
RobotUtil * RefVoidRobotUtil();

RobotUtil * getRobotUtil(std::string &robotName);
Expand Down
Loading

0 comments on commit 4d342e6

Please sign in to comment.