Skip to content
Snippets Groups Projects
Commit 2db1491c authored by Olivier Stasse's avatar Olivier Stasse
Browse files

Fix warning.

parent 0bd02285
No related branches found
Tags v1.0.1
No related merge requests found
cmake_minimum_required(VERSION 3.22.1 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 17)
project(gz-gep-tools)
# These variables have to be defined before running SETUP_PROJECT
set(PROJECT_NAME gz_gep_tools)
set(PROJECT_DESCRIPTION "Tools to control Gazebo through C++")
set(PROJECT_URL http://github.com/gepetto/gz_gep_tools)
include(cmake/base.cmake)
project(${PROJECT_NAME} CXX)
set(CMAKE_VERBOSE_MAKEFILE TRUE)
......
......@@ -32,7 +32,7 @@ class JointValues {
double vel_mes;
double force_ctrl;
std::string cmd_force_topic;
gz::transport::Node::Publisher;
gz::transport::Node::Publisher gz_pub_cmd_force;
};
/// This class handles the interface to the joints and the sensors
......
......@@ -35,8 +35,8 @@ ControlOverGz::ControlOverGz(std::string &world_prefix, bool debug_level)
void ControlOverGz::CallbackClock(const gz::msgs::Clock &a_gz_time_msg) {
if (a_gz_time_msg.has_sim())
{
gz_sim_time_ = a_gz_time_msg.sim().sec() +
1e-9*a_gz_time_msg.sim().nsec();
gz_sim_time_ = (double)a_gz_time_msg.sim().sec() +
1e-9*(double)a_gz_time_msg.sim().nsec();
if (debug_level_)
std::cerr << "ControlOverGz::CallbackClock: Time: " << a_gz_time_msg.sim().sec()
<< " " << a_gz_time_msg.sim().nsec()
......
......@@ -135,7 +135,7 @@ bool JointStateInterface::GetPosVel(std::vector<double> &pos_vecd,
return false;
std::lock_guard(last_state_.lock_state_access_);
time=last_state_.time_sec_ + 1e-9*last_state_.time_nsec_;
time=(double)last_state_.time_sec_ + 1e-9*(double)last_state_.time_nsec_;
for(std::vector<double>::size_type idx=0;
idx < pos_vecd.size();
idx++)
......
......@@ -42,7 +42,7 @@ void signal_handler(int _signal)
}
//////////////////////////////////////////////////
int main(int argc, char **argv)
int main(int , char **)
{
using namespace std::chrono_literals;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment