This commit adds software reset of the brainstem modules. First, the Moto
is reset, then the GP (it seems that the GP acts as the I2C router... so moto has to be reset first -- this may not be true, not sure yet). Reset can be toggled in pilot by sending a USR2 to the pilot process. If reset is sent while robot is executing any sort of move, the only way to recover is to kill pilot. Reset can be toggled whenever the robot is not moving without consequence (obviously, brainstem state (including wheel odometry) is lost). There is also a separate reset command (brainstem-reset) that works independently. This command is now called in the pilot-wrapper.sh script before pilot is (re)started. * GNUmakefile.in: new target `brainstem-reset'. * garcia-pilot.cc: not much. * garciaUtil.cc: the brainstem_reset function. * garciaUtil.hh: prototypes... * pilot-wrapper.sh: call brainstem-reset (NOTE: this always fails the first time, and I'm not sure why. It always succeeds subsequently... so it makes no difference at the moment). * brainstem-reset.cc: new command to reset the brainstem modules.
Showing
- robots/primotion/GNUmakefile.in 6 additions, 1 deletionrobots/primotion/GNUmakefile.in
- robots/primotion/brainstem-reset.cc 102 additions, 0 deletionsrobots/primotion/brainstem-reset.cc
- robots/primotion/garcia-pilot.cc 122 additions, 2 deletionsrobots/primotion/garcia-pilot.cc
- robots/primotion/garciaUtil.cc 149 additions, 0 deletionsrobots/primotion/garciaUtil.cc
- robots/primotion/garciaUtil.hh 29 additions, 0 deletionsrobots/primotion/garciaUtil.hh
- robots/primotion/pilot-wrapper.sh 7 additions, 0 deletionsrobots/primotion/pilot-wrapper.sh
Loading
Please register or sign in to comment