diff --git a/.travis.yml b/.travis.yml index 875b6abb77..5d2f15916e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ before_install: - wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - - sudo add-apt-repository ppa:wpilib/toolchain -y - sudo apt-get update -q || true - - sudo apt-get install frc-toolchain libgazebo6-dev protobuf-compiler libprotobuf-dev -y + - sudo apt-get install frc-toolchain libgazebo7-dev protobuf-compiler libprotobuf-dev -y before_cache: diff --git a/simulation/frc_gazebo_plugins/clock/src/clock.h b/simulation/frc_gazebo_plugins/clock/src/clock.h index 0287ed15de..c2a52870fc 100644 --- a/simulation/frc_gazebo_plugins/clock/src/clock.h +++ b/simulation/frc_gazebo_plugins/clock/src/clock.h @@ -24,7 +24,7 @@ using namespace gazebo; * To add a clock to your robot, add the following XML to your robot * model: * - * + * * ~/my/topic * * diff --git a/simulation/frc_gazebo_plugins/dc_motor/src/dc_motor.h b/simulation/frc_gazebo_plugins/dc_motor/src/dc_motor.h index 0a089dd1cb..3404706727 100644 --- a/simulation/frc_gazebo_plugins/dc_motor/src/dc_motor.h +++ b/simulation/frc_gazebo_plugins/dc_motor/src/dc_motor.h @@ -25,7 +25,7 @@ using namespace gazebo; * To add a DC motor to your robot, add the following XML to your * robot model: * - * + * * Joint Name * ~/my/topic * Number diff --git a/simulation/frc_gazebo_plugins/encoder/src/encoder.h b/simulation/frc_gazebo_plugins/encoder/src/encoder.h index 3b223f8afe..d9b01304fb 100644 --- a/simulation/frc_gazebo_plugins/encoder/src/encoder.h +++ b/simulation/frc_gazebo_plugins/encoder/src/encoder.h @@ -30,7 +30,7 @@ using namespace gazebo; * To add a encoder to your robot, add the following XML to your * robot model: * - * + * * Joint Name * ~/my/topic * {degrees, radians} diff --git a/simulation/frc_gazebo_plugins/gyro/src/gyro.h b/simulation/frc_gazebo_plugins/gyro/src/gyro.h index bdd2db2124..903dc7b5c3 100644 --- a/simulation/frc_gazebo_plugins/gyro/src/gyro.h +++ b/simulation/frc_gazebo_plugins/gyro/src/gyro.h @@ -29,7 +29,7 @@ typedef enum { Roll /*X*/, Pitch /*Y*/, Yaw /*Z*/ } ROTATION; * To add a gyro to your robot, add the following XML to your robot * model: * - * + * * Joint Name * ~/my/topic * {degrees, radians} diff --git a/simulation/frc_gazebo_plugins/limit_switch/src/external_limit_switch.cpp b/simulation/frc_gazebo_plugins/limit_switch/src/external_limit_switch.cpp index e58af2b67f..bd8761e808 100644 --- a/simulation/frc_gazebo_plugins/limit_switch/src/external_limit_switch.cpp +++ b/simulation/frc_gazebo_plugins/limit_switch/src/external_limit_switch.cpp @@ -8,15 +8,15 @@ #include "external_limit_switch.h" ExternalLimitSwitch::ExternalLimitSwitch(sdf::ElementPtr sdf) { - sensor = boost::dynamic_pointer_cast( + sensor = std::dynamic_pointer_cast( sensors::get_sensor(sdf->Get("sensor"))); gzmsg << "\texternal limit switch: " - << " sensor=" << sensor->GetName() << std::endl; + << " sensor=" << sensor->Name() << std::endl; } ExternalLimitSwitch::~ExternalLimitSwitch() {} bool ExternalLimitSwitch::Get() { - return sensor->GetContacts().contact().size() > 0; + return sensor->Contacts().contact().size() > 0; } diff --git a/simulation/frc_gazebo_plugins/limit_switch/src/limit_switch.h b/simulation/frc_gazebo_plugins/limit_switch/src/limit_switch.h index 6f5f561634..318be8d0fc 100644 --- a/simulation/frc_gazebo_plugins/limit_switch/src/limit_switch.h +++ b/simulation/frc_gazebo_plugins/limit_switch/src/limit_switch.h @@ -36,7 +36,7 @@ using namespace gazebo; * * Internal: * - * + * * ~/my/topic * internal * Joint Name @@ -47,7 +47,7 @@ using namespace gazebo; * * External: * - * + * * ~/my/topic * external * Sensor Name diff --git a/simulation/frc_gazebo_plugins/pneumatic_piston/src/pneumatic_piston.h b/simulation/frc_gazebo_plugins/pneumatic_piston/src/pneumatic_piston.h index 75fab23b38..1d93a9a83a 100644 --- a/simulation/frc_gazebo_plugins/pneumatic_piston/src/pneumatic_piston.h +++ b/simulation/frc_gazebo_plugins/pneumatic_piston/src/pneumatic_piston.h @@ -29,7 +29,7 @@ using namespace gazebo; * To add a pneumatic piston to your robot, add the following XML to * your robot model: * - * + * * Joint Name * ~/my/topic * {forward, reversed} diff --git a/simulation/frc_gazebo_plugins/potentiometer/src/potentiometer.h b/simulation/frc_gazebo_plugins/potentiometer/src/potentiometer.h index 3a5945e9cc..a9b46f33f1 100644 --- a/simulation/frc_gazebo_plugins/potentiometer/src/potentiometer.h +++ b/simulation/frc_gazebo_plugins/potentiometer/src/potentiometer.h @@ -22,7 +22,7 @@ using namespace gazebo; * To add a potentiometer to your robot, add the following XML to your * robot model: * - * + * * Joint Name * ~/my/topic * {degrees, radians} diff --git a/simulation/frc_gazebo_plugins/rangefinder/src/rangefinder.cpp b/simulation/frc_gazebo_plugins/rangefinder/src/rangefinder.cpp index 81f61136b8..00210b889e 100644 --- a/simulation/frc_gazebo_plugins/rangefinder/src/rangefinder.cpp +++ b/simulation/frc_gazebo_plugins/rangefinder/src/rangefinder.cpp @@ -17,8 +17,6 @@ #include #include -#include - GZ_REGISTER_MODEL_PLUGIN(Rangefinder) Rangefinder::Rangefinder() {} @@ -29,7 +27,7 @@ void Rangefinder::Load(physics::ModelPtr model, sdf::ElementPtr sdf) { this->model = model; // Parse SDF properties - sensor = boost::dynamic_pointer_cast( + sensor = std::dynamic_pointer_cast( sensors::get_sensor(sdf->Get("sensor"))); if (sdf->HasElement("topic")) { topic = sdf->Get("topic"); @@ -37,8 +35,8 @@ void Rangefinder::Load(physics::ModelPtr model, sdf::ElementPtr sdf) { topic = "~/" + sdf->GetAttribute("name")->GetAsString(); } - gzmsg << "Initializing rangefinder: " << topic - << " sensor=" << sensor->GetName() << std::endl; + gzmsg << "Initializing rangefinder: " << topic << " sensor=" << sensor->Name() + << std::endl; // Connect to Gazebo transport for messaging std::string scoped_name = @@ -56,6 +54,6 @@ void Rangefinder::Load(physics::ModelPtr model, sdf::ElementPtr sdf) { void Rangefinder::Update(const common::UpdateInfo& info) { msgs::Float64 msg; - msg.set_data(sensor->GetRange()); + msg.set_data(sensor->Range()); pub->Publish(msg); } diff --git a/simulation/frc_gazebo_plugins/rangefinder/src/rangefinder.h b/simulation/frc_gazebo_plugins/rangefinder/src/rangefinder.h index 3adfc5eed5..fca9a2b6a0 100644 --- a/simulation/frc_gazebo_plugins/rangefinder/src/rangefinder.h +++ b/simulation/frc_gazebo_plugins/rangefinder/src/rangefinder.h @@ -22,7 +22,7 @@ using namespace gazebo; * To add a rangefinder to your robot, add the following XML to your * robot model: * - * + * * Sensor Name * ~/my/topic * diff --git a/simulation/frc_gazebo_plugins/servo/src/servo.cpp b/simulation/frc_gazebo_plugins/servo/src/servo.cpp index 95839daa7e..1f988fe2c4 100644 --- a/simulation/frc_gazebo_plugins/servo/src/servo.cpp +++ b/simulation/frc_gazebo_plugins/servo/src/servo.cpp @@ -40,8 +40,8 @@ void Servo::Load(physics::ModelPtr model, sdf::ElementPtr sdf) { torque = 5; } - gzmsg << "initializing awesome servo: " << topic - << " joint=" << joint->GetName() << " torque=" << torque << std::endl; + gzmsg << "initializing servo: " << topic << " joint=" << joint->GetName() + << " torque=" << torque << std::endl; // Connect to Gazebo transport for messaging std::string scoped_name = diff --git a/simulation/frc_gazebo_plugins/servo/src/servo.h b/simulation/frc_gazebo_plugins/servo/src/servo.h index 528f5b1675..925b707d7a 100644 --- a/simulation/frc_gazebo_plugins/servo/src/servo.h +++ b/simulation/frc_gazebo_plugins/servo/src/servo.h @@ -23,9 +23,10 @@ using namespace gazebo; * To add a servo to your robot, add the following XML to your robot * model: * - * + * * Joint Name * /gzebo/frc/simulator/pwm/1 + * 0 * * * - `link`: Name of the link the servo is attached to.