Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
/*----------------------------------------------------------------------------*/
|
2016-01-02 03:02:34 -08:00
|
|
|
/* Copyright (c) FIRST 2011-2016. All Rights Reserved. */
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
/* Open Source Software - may be modified and shared by FRC teams. The code */
|
2016-01-02 03:02:34 -08:00
|
|
|
/* must be accompanied by the FIRST BSD license file in the root directory of */
|
|
|
|
|
/* the project. */
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
/*----------------------------------------------------------------------------*/
|
|
|
|
|
|
|
|
|
|
#include "Commands/CommandGroup.h"
|
2016-09-25 16:50:13 -07:00
|
|
|
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
#include "WPIErrors.h"
|
|
|
|
|
|
2016-11-01 22:33:12 -07:00
|
|
|
using namespace frc;
|
|
|
|
|
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
/**
|
|
|
|
|
* Creates a new {@link CommandGroup CommandGroup} with the given name.
|
|
|
|
|
* @param name the name for this command group
|
|
|
|
|
*/
|
2016-05-20 17:30:37 -07:00
|
|
|
CommandGroup::CommandGroup(const std::string& name) : Command(name) {}
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
|
|
|
|
|
/**
|
2015-06-25 15:07:55 -04:00
|
|
|
* Adds a new {@link Command Command} to the group. The {@link Command Command}
|
2016-05-20 17:30:37 -07:00
|
|
|
* will be started after all the previously added {@link Command Commands}.
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
2015-06-25 15:07:55 -04:00
|
|
|
* <p>Note that any requirements the given {@link Command Command} has will be
|
2016-05-20 17:30:37 -07:00
|
|
|
* added to the group. For this reason, a {@link Command Command's}
|
|
|
|
|
* requirements can not be changed after being added to a group.</p>
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
|
|
|
|
* <p>It is recommended that this method be called in the constructor.</p>
|
2015-06-25 15:07:55 -04:00
|
|
|
*
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
* @param command The {@link Command Command} to be added
|
|
|
|
|
*/
|
2016-05-20 17:30:37 -07:00
|
|
|
void CommandGroup::AddSequential(Command* command) {
|
2015-06-23 04:49:51 -07:00
|
|
|
if (command == nullptr) {
|
2015-06-25 15:07:55 -04:00
|
|
|
wpi_setWPIErrorWithContext(NullParameter, "command");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!AssertUnlocked("Cannot add new command to command group")) return;
|
|
|
|
|
|
|
|
|
|
command->SetParent(this);
|
|
|
|
|
|
|
|
|
|
m_commands.push_back(
|
|
|
|
|
CommandGroupEntry(command, CommandGroupEntry::kSequence_InSequence));
|
|
|
|
|
// Iterate through command->GetRequirements() and call Requires() on each
|
|
|
|
|
// required subsystem
|
|
|
|
|
Command::SubsystemSet requirements = command->GetRequirements();
|
2015-06-23 04:49:51 -07:00
|
|
|
auto iter = requirements.begin();
|
2015-06-25 15:07:55 -04:00
|
|
|
for (; iter != requirements.end(); iter++) Requires(*iter);
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Adds a new {@link Command Command} to the group with a given timeout.
|
2015-06-25 15:07:55 -04:00
|
|
|
* The {@link Command Command} will be started after all the previously added
|
|
|
|
|
* commands.
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
2015-06-25 15:07:55 -04:00
|
|
|
* <p>Once the {@link Command Command} is started, it will be run until it
|
2016-05-20 17:30:37 -07:00
|
|
|
* finishes or the time expires, whichever is sooner. Note that the given
|
|
|
|
|
* {@link Command Command} will have no knowledge that it is on a timer.</p>
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
2015-06-25 15:07:55 -04:00
|
|
|
* <p>Note that any requirements the given {@link Command Command} has will be
|
2016-05-20 17:30:37 -07:00
|
|
|
* added to the group. For this reason, a {@link Command Command's}
|
|
|
|
|
* requirements can not be changed after being added to a group.</p>
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
|
|
|
|
* <p>It is recommended that this method be called in the constructor.</p>
|
|
|
|
|
*
|
|
|
|
|
* @param command The {@link Command Command} to be added
|
|
|
|
|
* @param timeout The timeout (in seconds)
|
|
|
|
|
*/
|
2016-05-20 17:30:37 -07:00
|
|
|
void CommandGroup::AddSequential(Command* command, double timeout) {
|
2015-06-23 04:49:51 -07:00
|
|
|
if (command == nullptr) {
|
2015-06-25 15:07:55 -04:00
|
|
|
wpi_setWPIErrorWithContext(NullParameter, "command");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!AssertUnlocked("Cannot add new command to command group")) return;
|
|
|
|
|
if (timeout < 0.0) {
|
|
|
|
|
wpi_setWPIErrorWithContext(ParameterOutOfRange, "timeout < 0.0");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
command->SetParent(this);
|
|
|
|
|
|
|
|
|
|
m_commands.push_back(CommandGroupEntry(
|
|
|
|
|
command, CommandGroupEntry::kSequence_InSequence, timeout));
|
|
|
|
|
// Iterate through command->GetRequirements() and call Requires() on each
|
|
|
|
|
// required subsystem
|
|
|
|
|
Command::SubsystemSet requirements = command->GetRequirements();
|
2015-06-23 04:49:51 -07:00
|
|
|
auto iter = requirements.begin();
|
2015-06-25 15:07:55 -04:00
|
|
|
for (; iter != requirements.end(); iter++) Requires(*iter);
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2015-06-25 15:07:55 -04:00
|
|
|
* Adds a new child {@link Command} to the group. The {@link Command} will be
|
2016-05-20 17:30:37 -07:00
|
|
|
* started after all the previously added {@link Command Commands}.
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
2015-06-25 15:07:55 -04:00
|
|
|
* <p>Instead of waiting for the child to finish, a {@link CommandGroup} will
|
2016-05-20 17:30:37 -07:00
|
|
|
* have it run at the same time as the subsequent {@link Command Commands}.
|
|
|
|
|
* The child will run until either it finishes, a new child with conflicting
|
|
|
|
|
* requirements is started, or the main sequence runs a {@link Command} with
|
|
|
|
|
* conflicting requirements. In the latter two cases, the child will be
|
|
|
|
|
* canceled even if it says it can't be interrupted.</p>
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
2015-06-25 15:07:55 -04:00
|
|
|
* <p>Note that any requirements the given {@link Command Command} has will be
|
2016-05-20 17:30:37 -07:00
|
|
|
* added to the group. For this reason, a {@link Command Command's}
|
|
|
|
|
* requirements can not be changed after being added to a group.</p>
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
|
|
|
|
* <p>It is recommended that this method be called in the constructor.</p>
|
|
|
|
|
*
|
|
|
|
|
* @param command The command to be added
|
|
|
|
|
*/
|
2016-05-20 17:30:37 -07:00
|
|
|
void CommandGroup::AddParallel(Command* command) {
|
2015-06-23 04:49:51 -07:00
|
|
|
if (command == nullptr) {
|
2015-06-25 15:07:55 -04:00
|
|
|
wpi_setWPIErrorWithContext(NullParameter, "command");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!AssertUnlocked("Cannot add new command to command group")) return;
|
|
|
|
|
|
|
|
|
|
command->SetParent(this);
|
|
|
|
|
|
|
|
|
|
m_commands.push_back(
|
|
|
|
|
CommandGroupEntry(command, CommandGroupEntry::kSequence_BranchChild));
|
|
|
|
|
// Iterate through command->GetRequirements() and call Requires() on each
|
|
|
|
|
// required subsystem
|
|
|
|
|
Command::SubsystemSet requirements = command->GetRequirements();
|
2015-06-23 04:49:51 -07:00
|
|
|
auto iter = requirements.begin();
|
2015-06-25 15:07:55 -04:00
|
|
|
for (; iter != requirements.end(); iter++) Requires(*iter);
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
2015-06-25 15:07:55 -04:00
|
|
|
* Adds a new child {@link Command} to the group with the given timeout. The
|
2016-05-20 17:30:37 -07:00
|
|
|
* {@link Command} will be started after all the previously added
|
|
|
|
|
* {@link Command Commands}.
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
2015-06-25 15:07:55 -04:00
|
|
|
* <p>Once the {@link Command Command} is started, it will run until it
|
2016-05-20 17:30:37 -07:00
|
|
|
* finishes, is interrupted, or the time expires, whichever is sooner. Note
|
|
|
|
|
* that the given {@link Command Command} will have no knowledge that it is on
|
|
|
|
|
* a timer.</p>
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
2015-06-25 15:07:55 -04:00
|
|
|
* <p>Instead of waiting for the child to finish, a {@link CommandGroup} will
|
2016-05-20 17:30:37 -07:00
|
|
|
* have it run at the same time as the subsequent {@link Command Commands}.
|
|
|
|
|
* The child will run until either it finishes, the timeout expires, a new
|
|
|
|
|
* child with conflicting requirements is started, or the main sequence runs a
|
|
|
|
|
* {@link Command} with conflicting requirements. In the latter two cases, the
|
|
|
|
|
* child will be canceled even if it says it can't be interrupted.</p>
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
2015-06-25 15:07:55 -04:00
|
|
|
* <p>Note that any requirements the given {@link Command Command} has will be
|
2016-05-20 17:30:37 -07:00
|
|
|
* added to the group. For this reason, a {@link Command Command's}
|
|
|
|
|
* requirements can not be changed after being added to a group.</p>
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
*
|
|
|
|
|
* <p>It is recommended that this method be called in the constructor.</p>
|
|
|
|
|
*
|
|
|
|
|
* @param command The command to be added
|
|
|
|
|
* @param timeout The timeout (in seconds)
|
|
|
|
|
*/
|
2016-05-20 17:30:37 -07:00
|
|
|
void CommandGroup::AddParallel(Command* command, double timeout) {
|
2015-06-23 04:49:51 -07:00
|
|
|
if (command == nullptr) {
|
2015-06-25 15:07:55 -04:00
|
|
|
wpi_setWPIErrorWithContext(NullParameter, "command");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!AssertUnlocked("Cannot add new command to command group")) return;
|
|
|
|
|
if (timeout < 0.0) {
|
|
|
|
|
wpi_setWPIErrorWithContext(ParameterOutOfRange, "timeout < 0.0");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
command->SetParent(this);
|
|
|
|
|
|
|
|
|
|
m_commands.push_back(CommandGroupEntry(
|
|
|
|
|
command, CommandGroupEntry::kSequence_BranchChild, timeout));
|
|
|
|
|
// Iterate through command->GetRequirements() and call Requires() on each
|
|
|
|
|
// required subsystem
|
|
|
|
|
Command::SubsystemSet requirements = command->GetRequirements();
|
2015-06-23 04:49:51 -07:00
|
|
|
auto iter = requirements.begin();
|
2015-06-25 15:07:55 -04:00
|
|
|
for (; iter != requirements.end(); iter++) Requires(*iter);
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
void CommandGroup::_Initialize() { m_currentCommandIndex = -1; }
|
|
|
|
|
|
|
|
|
|
void CommandGroup::_Execute() {
|
|
|
|
|
CommandGroupEntry entry;
|
2016-05-20 17:30:37 -07:00
|
|
|
Command* cmd = nullptr;
|
2015-06-25 15:07:55 -04:00
|
|
|
bool firstRun = false;
|
|
|
|
|
|
|
|
|
|
if (m_currentCommandIndex == -1) {
|
|
|
|
|
firstRun = true;
|
|
|
|
|
m_currentCommandIndex = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2016-09-05 13:55:31 -07:00
|
|
|
while (static_cast<size_t>(m_currentCommandIndex) < m_commands.size()) {
|
2015-06-23 04:49:51 -07:00
|
|
|
if (cmd != nullptr) {
|
2015-06-25 15:07:55 -04:00
|
|
|
if (entry.IsTimedOut()) cmd->_Cancel();
|
|
|
|
|
|
|
|
|
|
if (cmd->Run()) {
|
|
|
|
|
break;
|
|
|
|
|
} else {
|
|
|
|
|
cmd->Removed();
|
|
|
|
|
m_currentCommandIndex++;
|
|
|
|
|
firstRun = true;
|
2015-06-23 04:49:51 -07:00
|
|
|
cmd = nullptr;
|
2015-06-25 15:07:55 -04:00
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
entry = m_commands[m_currentCommandIndex];
|
2015-06-23 04:49:51 -07:00
|
|
|
cmd = nullptr;
|
2015-06-25 15:07:55 -04:00
|
|
|
|
|
|
|
|
switch (entry.m_state) {
|
|
|
|
|
case CommandGroupEntry::kSequence_InSequence:
|
|
|
|
|
cmd = entry.m_command;
|
|
|
|
|
if (firstRun) {
|
|
|
|
|
cmd->StartRunning();
|
|
|
|
|
CancelConflicts(cmd);
|
|
|
|
|
firstRun = false;
|
|
|
|
|
}
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CommandGroupEntry::kSequence_BranchPeer:
|
|
|
|
|
m_currentCommandIndex++;
|
|
|
|
|
entry.m_command->Start();
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
|
|
case CommandGroupEntry::kSequence_BranchChild:
|
|
|
|
|
m_currentCommandIndex++;
|
|
|
|
|
CancelConflicts(entry.m_command);
|
|
|
|
|
entry.m_command->StartRunning();
|
|
|
|
|
m_children.push_back(entry);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Run Children
|
2015-06-23 04:49:51 -07:00
|
|
|
auto iter = m_children.begin();
|
2015-06-25 15:07:55 -04:00
|
|
|
for (; iter != m_children.end();) {
|
|
|
|
|
entry = *iter;
|
2016-05-20 17:30:37 -07:00
|
|
|
Command* child = entry.m_command;
|
2015-06-25 15:07:55 -04:00
|
|
|
if (entry.IsTimedOut()) child->_Cancel();
|
|
|
|
|
|
|
|
|
|
if (!child->Run()) {
|
|
|
|
|
child->Removed();
|
|
|
|
|
iter = m_children.erase(iter);
|
|
|
|
|
} else {
|
|
|
|
|
iter++;
|
|
|
|
|
}
|
|
|
|
|
}
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
void CommandGroup::_End() {
|
|
|
|
|
// Theoretically, we don't have to check this, but we do if teams override the
|
|
|
|
|
// IsFinished method
|
|
|
|
|
if (m_currentCommandIndex != -1 &&
|
2016-09-05 13:55:31 -07:00
|
|
|
static_cast<size_t>(m_currentCommandIndex) < m_commands.size()) {
|
2016-05-20 17:30:37 -07:00
|
|
|
Command* cmd = m_commands[m_currentCommandIndex].m_command;
|
2015-06-25 15:07:55 -04:00
|
|
|
cmd->_Cancel();
|
|
|
|
|
cmd->Removed();
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-23 04:49:51 -07:00
|
|
|
auto iter = m_children.begin();
|
2015-06-25 15:07:55 -04:00
|
|
|
for (; iter != m_children.end(); iter++) {
|
2016-05-20 17:30:37 -07:00
|
|
|
Command* cmd = iter->m_command;
|
2015-06-25 15:07:55 -04:00
|
|
|
cmd->_Cancel();
|
|
|
|
|
cmd->Removed();
|
|
|
|
|
}
|
|
|
|
|
m_children.clear();
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
void CommandGroup::_Interrupted() { _End(); }
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
|
|
|
|
|
// Can be overwritten by teams
|
2015-06-25 15:07:55 -04:00
|
|
|
void CommandGroup::Initialize() {}
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
|
|
|
|
|
// Can be overwritten by teams
|
2015-06-25 15:07:55 -04:00
|
|
|
void CommandGroup::Execute() {}
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
|
|
|
|
|
// Can be overwritten by teams
|
2015-06-25 15:07:55 -04:00
|
|
|
void CommandGroup::End() {}
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
|
|
|
|
|
// Can be overwritten by teams
|
2015-06-25 15:07:55 -04:00
|
|
|
void CommandGroup::Interrupted() {}
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
bool CommandGroup::IsFinished() {
|
2016-09-05 13:55:31 -07:00
|
|
|
return static_cast<size_t>(m_currentCommandIndex) >= m_commands.size() &&
|
2015-06-25 15:07:55 -04:00
|
|
|
m_children.empty();
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
bool CommandGroup::IsInterruptible() const {
|
|
|
|
|
if (!Command::IsInterruptible()) return false;
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
|
2015-06-25 15:07:55 -04:00
|
|
|
if (m_currentCommandIndex != -1 &&
|
2016-09-05 13:55:31 -07:00
|
|
|
static_cast<size_t>(m_currentCommandIndex) < m_commands.size()) {
|
2016-05-20 17:30:37 -07:00
|
|
|
Command* cmd = m_commands[m_currentCommandIndex].m_command;
|
2015-06-25 15:07:55 -04:00
|
|
|
if (!cmd->IsInterruptible()) return false;
|
|
|
|
|
}
|
|
|
|
|
|
2015-06-23 04:49:51 -07:00
|
|
|
auto iter = m_children.cbegin();
|
2015-06-25 15:07:55 -04:00
|
|
|
for (; iter != m_children.cend(); iter++) {
|
|
|
|
|
if (!iter->m_command->IsInterruptible()) return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return true;
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
}
|
|
|
|
|
|
2016-05-20 17:30:37 -07:00
|
|
|
void CommandGroup::CancelConflicts(Command* command) {
|
2015-06-23 04:49:51 -07:00
|
|
|
auto childIter = m_children.begin();
|
2015-06-25 15:07:55 -04:00
|
|
|
for (; childIter != m_children.end();) {
|
2016-05-20 17:30:37 -07:00
|
|
|
Command* child = childIter->m_command;
|
2015-06-25 15:07:55 -04:00
|
|
|
bool erased = false;
|
|
|
|
|
|
|
|
|
|
Command::SubsystemSet requirements = command->GetRequirements();
|
2015-06-23 04:49:51 -07:00
|
|
|
auto requirementIter = requirements.begin();
|
2015-06-25 15:07:55 -04:00
|
|
|
for (; requirementIter != requirements.end(); requirementIter++) {
|
|
|
|
|
if (child->DoesRequire(*requirementIter)) {
|
|
|
|
|
child->_Cancel();
|
|
|
|
|
child->Removed();
|
|
|
|
|
childIter = m_children.erase(childIter);
|
|
|
|
|
erased = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!erased) childIter++;
|
|
|
|
|
}
|
Initial commit of the WPILib simulation support in an alpha quality state.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Added Omar's changes to the compressor interface
Fixes to make C++ plugin compile on linux.
Added import of the WPILibSim code from the graduate class. It shows up as wpilibJavaSim to follow the convention set by wpilibJava, wpilibJavaJNI and wpilibJavaFinal.
Fixed wpilibJavaSim artifactId to mirror the new convention.
Modified the build of the java plugin to pull in the simulation dependencies.
Added stacktrace printing.
Fixed support for creating projects.
Added support for the isReal() and isSimulation() methods along with the AnalogPotentiometer object to support simulating GearsBot.
Added support for a "WPILib Simulate" button.
Added GearsBot to the built in examples.
Added support for specifying the world file during project creation and switched the default from BluntObjectBot to GearsBot.
Removed unused import.
Added file browser for world files.
Added support for debugging in simulation.
Change simulate icon to be a Gazebo icon.
Switched over to the gazebo messaging system.
Updated location of default world file.
Reverted cmake change.
Fixed bug in WPILibJSim, added better logging and cleaned up code.
Made the frc_gazebo_plugin build using raw cmake instead of catkin, breaking the final ROS dependencies.
Added installation to frc_gazebo_plugin Makefile.
Fixed running of simulation to actually use frcsim.
Initial commit of simulation library for C++. Has the minimal subset of features necessary for having a Simple Robot run in teleoperated mode.
Added notes for generating protobuf messages.
Import of the debuild process into the main repository.
Moved frc_gazebo_plugin under simulation and removed the gazebo folder.
Updated the gazebo plugin to remove excessive printing and limit motor signal to [-1,1].
Updated WPILibJSim to support latching messages and to sleep for 20ms in iterative robot.
Reduced delay between starting frcsim and the users program to 1 second.
Updated GearsBot example.
Fixed a few minor issues for demoable state.
Added simulator support for Victors, Jaguars and Talons.
Added NetworkTables, SmartDashboard and LiveWindow to the simulator.
Added AnalogPotentiometer for simulation.
Added support for simulating encoders.
Added simulation support for Gyro.
Added IterativeRobot, Fixed Timers, Notifiers, PIDControllers and other minor fixes + cleanup.
Added RobotDrive support to simulation.
Separated out JavaGazebo so that SimDS will be able to reuse it.
Separated out SimDS into its own application..
Fixes so that the SimDS is distributed and runs properly for Java with the eclipse plugins.
Added DriverStation support to WPILibCSim
Cleanup of DriverStation, WaitUntilCommand and AnalogPotentiometer for WPILibCSim.
Cleanup of includes for WPILibCSim
Added AnalogPotentiometer to the real WPILibC.
Added AnalogPotentiometer to the real WPILibC.
Added GearsBot example to C++ eclipse plugin.
WPILibCSim fixes to work with launching from the plugin.
Package libwpilibsim in a deb file.
Added includes to plugin distribution.
Added support for external-limit-switches to Gazebo, Java and C++.
Added support for Gazebo Rangefinders and Analog channels to read their values in C++ and Java.
Added support for internal limit switches.
Updated GearsBot programs to use limit switches + range finders.
Added disabling of motors when robot is disabled to more closely mimic the real robot.
Fixes to deal with the switch to .hpp files in the HAL and other misc problems due to rebasing.
Change-Id: I624c5f4d0f28282616a7c92083575bf68adcdce2
2014-06-12 11:02:26 -07:00
|
|
|
}
|
2015-06-25 15:07:55 -04:00
|
|
|
|
|
|
|
|
int CommandGroup::GetSize() const { return m_children.size(); }
|