PilotNode Class Reference
controls the ART vehicle brake, throttle, steering and transmission
More...
List of all members.
Detailed Description
controls the ART vehicle brake, throttle, steering and transmission
The pilot receives CarDriveStamped messages from the navigator, then translates them into commands to the servo motor actuators for controlling the speed and direction of the vehicle. It gets odometry information from a separate node.
Subscribes:
- pilot/drive [art_msgs::CarDriveStamped] driving command
- pilot/cmd [art_msgs::CarCommand] velocity and steering angle command
- imu [sensor_msgs::Imu] estimate of robot accelerations
- odom [nav_msgs::Odometry] estimate of robot position and velocity.
- brake/state [art_msgs::BrakeState] brake status.
- shifter/state [art_msgs::Shifter] shifter relays status.
- steering/state [art_msgs::SteeringState] steering status.
- throttle/state [art_msgs::ThrottleState] throttle status.
Publishes:
- pilot/state [art_msgs::PilotState] current pilot state information.
- brake/cmd [art_msgs::BrakeCommand] brake commands.
- shifter/cmd [art_msgs::Shifter] shifter commands.
- steering/cmd [art_msgs::SteeringCommand] steering commands.
- throttle/cmd [art_msgs::ThrottleCommand] throttle commands. Pilot node class.
Definition at line 82 of file pilot.cc.
Member Typedef Documentation
Constructor & Destructor Documentation
PilotNode::PilotNode |
( |
ros::NodeHandle |
node |
) |
|
Member Function Documentation
void PilotNode::adjustSteering |
( |
void |
|
) |
[private] |
Adjust steering angle.
We do not use PID control, because the odometry does not provide accurate yaw speed feedback. Instead, we directly compute the corresponding steering angle. We can use open loop control at this level, because navigator monitors our actual course and will request any steering changes needed to reach its goal.
- Todo:
- Limit angle actually requested based on current velocity to avoid unsafe high speed turns.
Definition at line 213 of file pilot.cc.
void PilotNode::halt |
( |
void |
|
) |
[private] |
halt -- soft version of hardware E-Stop.
The goal is to bring the vehicle to a halt as quickly as possible, while remaining safely under control. Normally, navigator sends gradually declining speed requests when bringing the vehicle to a controlled stop. The only abrupt requests we see are in "emergency" stop situations, when there was a pause request, or no clear path around an obstacle.
- Note:
- The target goal velocity may not always be zero, due to the gear shifting requirements.
- Postcondition:
- Since this function bypasses the normal acceleration controller, it is reset on exit.
Definition at line 245 of file pilot.cc.
void PilotNode::monitorHardware |
( |
void |
|
) |
[private] |
monitor hardware status based on current inputs
- Postcondition:
- pstate_msg_ updated to reflect current control hardware status and time of this cycle
- Todo:
- Optionally check if no commands received recently.
Definition at line 275 of file pilot.cc.
void PilotNode::processCarCommand |
( |
const art_msgs::CarCommand::ConstPtr & |
msg |
) |
[private] |
CarCommand message callback (now DEPRECATED)
Definition at line 329 of file pilot.cc.
void PilotNode::processCarDrive |
( |
const art_msgs::CarDriveStamped::ConstPtr & |
msg |
) |
[private] |
CarDriveStamped message callback
Definition at line 321 of file pilot.cc.
void PilotNode::processLearning |
( |
const art_msgs::LearningCommand::ConstPtr & |
learningIn |
) |
[private] |
LearningCommand message callback (DEPRECATED)
Definition at line 359 of file pilot.cc.
void PilotNode::reconfig |
( |
Config & |
newconfig, |
|
|
uint32_t |
level | |
|
) |
| | [private] |
handle dynamic reconfigure service request
- Parameters:
-
| newconfig | new configuration from dynamic reconfigure client, becomes the service reply message as updated here. |
| level | SensorLevels value (0xffffffff on initial call) |
This is done without any locking because it is called in the same thread as ros::spinOnce() and all the topic subscription callbacks.
Definition at line 377 of file pilot.cc.
void PilotNode::speedControl |
( |
void |
|
) |
[private] |
Speed control
Manage the shifter. Inputs are the current and target states. If a gear shift is requested, the vehicle must first be brought to a stop, then one of the transmission shift relays set for one second (then reset), before the vehicle can begin moving in the opposite direction.
Definition at line 405 of file pilot.cc.
void PilotNode::spin |
( |
void |
|
) |
|
void PilotNode::validateTarget |
( |
void |
|
) |
[private] |
validate target CarDrive values
Definition at line 477 of file pilot.cc.
Member Data Documentation
The documentation for this class was generated from the following file: