Skip to content

Commit

Permalink
No more MyCroft
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisl8 committed Oct 7, 2024
1 parent 6cf0cd3 commit c943566
Show file tree
Hide file tree
Showing 21 changed files with 7 additions and 293 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ website/node_modules/
website/typings/
website/app/*.js
website/app/*.js.map
/mycroft-core
/mjpg-streamer
PropellerCodeForArloBot/ROSInterfaceForArloBotWithDHB10.binary
PropellerCodeForArloBot/ROSInterfaceForArloBotWithDHB10.elf
Expand Down
10 changes: 1 addition & 9 deletions FullTestRoutine.MD
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,4 @@
3. Scripts

- Test every script in the scripts folder

4. Mycroft

- Ensure robot responds to basic requests
- Weather
- Time
- Test each voice command
- 'start ros' or 'start robot'
- TODO: Add the new ones here.

4 changes: 0 additions & 4 deletions ToDoList.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@
- Fun TTS and/or audio clip.
- Track and if repeated, affect the random destination picker.

- Mycroft: Set up more skills.
- Load Map
- Voice command to go to locations.

- Speak when things are done like starting ROS, making maps, etc.
- Asked to unplug
- Uplugged
Expand Down
1 change: 0 additions & 1 deletion cypress-tests/cypress/e2e/0-2-siteStartupLayout.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ describe("site initial layout and page function", () => {

cy.contains("robotName:").should("be.visible");
cy.contains("idleTimeoutInMinutes:").should("be.visible");
cy.contains("useMyCroft:").should("be.visible");
cy.contains("rosLibDelay:").should("be.visible");
cy.contains("useMasterPowerRelay:").should("be.visible");
cy.contains("masterPowerRelayUniqueString:").should("be.visible");
Expand Down
3 changes: 0 additions & 3 deletions cypress-tests/cypress/e2e/1-1-statusPanelFunctions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ describe("Status Panel Functions", () => {
// .should("be.visible");
// cy.get("#masterRelayStatusButton").should("not.have.class", "btn-success");

// cy.get("#mycroftStatusButton").contains("span", "Up").should("be.visible");
// cy.get("#mycroftStatusButton").should("have.class", "btn-success");

cy.get("#cloudStatusButton").contains("span", "Up").should("be.visible");
cy.get("#cloudStatusButton").should("have.class", "btn-success");
});
Expand Down
6 changes: 0 additions & 6 deletions cypress-tests/cypress/e2e/1-3-behaviorPanelFunctions.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,6 @@ describe("Behavior Panel Functions", () => {
//
// cy.contains("Ask").click();
//
// /*
// * cat /opt/mycroft/skills/mycroft-configuration.mycroftai/dialog/en-us/my.name.is.dialog
// * my device name is {{name}}
// * I'm named {{name}}
// */
//
// cy.get("#robot-said-text").contains("name").should("be.visible");
//
// cy.get("#robot-said-text").contains("TwoFlower").should("be.visible");
Expand Down
1 change: 0 additions & 1 deletion cypress-tests/cypress/support/panelTestsWithRosOff.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ function statusPanelShouldBeOpen(trueFalse) {
cy.contains("Debugging").should(visibilitystatus);
// cy.contains("Camera").should(visibilitystatus);
// cy.contains("Master Relay").should(visibilitystatus);
// cy.contains("Mycroft").should(visibilitystatus);
cy.contains("Cloud").should(visibilitystatus);
});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ function initialPageLoadItemsVisible() {
cy.contains("Debugging").should("be.visible");
// cy.contains("Camera").should("be.visible");
// cy.contains("Master Relay").should("be.visible");
// cy.contains("Mycroft").should("be.visible");
cy.contains("Cloud").should("be.visible");
cy.contains("Relays").should("be.visible");
cy.contains("Behavior").should("be.visible");
Expand Down
156 changes: 0 additions & 156 deletions node/MyCroft.js

This file was deleted.

16 changes: 1 addition & 15 deletions node/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,21 +91,7 @@ async function main() {

webserver.start();

if (personalData.useMyCroft) {
// The purpose of using myCroft to simply announce the robot's name is to validate that MyCroft is up.
// Also, If you use the robot's name as a wake word and send it via TTS, MyCroft hears it and tries to respond.
// Otherwise the normal speech engine is the better option for event based announcements.
// MyCroft is primarily for interactive operations, such as asking the robot to do things.
// eslint-disable-next-line global-require
const myCroft = require('./MyCroft');
myCroft.init();
setTimeout(() => {
// Give init time to finish.
tts(`Hello, my name is ${personalData.robotName}`);
}, 3000);
} else {
tts(`Hello, my name is ${personalData.robotName}`);
}
tts(`Hello, my name is ${personalData.robotName}`);

// ## Scripts and ROS Commands that will be called by nodes ##
// NOTE: Be sure to put 'unbuffer ' at the beginning of any ROScommand
Expand Down
1 change: 0 additions & 1 deletion node/speechEngine.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ const eventsToAlwaysIgnore = [
'abd_reverse_speed_limit',
'heading',
'min_distance_sensor',
'myCroftSaid',
];

function talkAboutEvents(key, value) {
Expand Down
9 changes: 0 additions & 9 deletions node/tts.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const readFile = promisify(fs.readFile);
const personalData = require('./personalData');
const webModel = require('./webModel');
const webModelFunctions = require('./webModelFunctions');
const myCroft = require('./MyCroft');
const robotModel = require('./robotModel');

async function tts(sound) {
Expand Down Expand Up @@ -37,12 +36,6 @@ async function tts(sound) {
if (!sound) {
console.error('I was asked to say nothing.');
} else if (webModel.beQuiet) {
if (personalData.useMyCroft) {
webModelFunctions.update(
'myCroftSaid',
'I cannot reply, because I was asked to be quiet.',
);
}
// Log to console
console.log(sound);
} else {
Expand Down Expand Up @@ -91,8 +84,6 @@ async function tts(sound) {
console.error(dataHolder);
}
});
} else if (personalData.useMyCroft) {
myCroft.sayText(sound);
} else if (personalData.speechProgram) {
spawn(personalData.speechProgram, [sound]);
}
Expand Down
2 changes: 0 additions & 2 deletions node/webModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
module.exports = {
robotName: 'ArloBot', // This will be overridden by personalData in index.js,
cloudServerConnected: false,
myCroftIsRunning: false,
myCroftSaid: '',
lastUpdateTime: 0,
videoSource: 'xscreen.png',
masterRelayOn: false,
Expand Down
17 changes: 1 addition & 16 deletions node/webserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ const arduino = new Arduino();
const robotModel = require('./robotModel');
const LaunchScript = require('./LaunchScript');
const tts = require('./tts');
const myCroft = require('./MyCroft');
const WayPoints = require('./WayPoints.js');

const wayPointEditor = new WayPoints();
Expand Down Expand Up @@ -193,18 +192,7 @@ async function start() {
tts(data);
});
socket.on('ask', (data) => {
if (personalData.useMyCroft) {
if (webModel.beQuiet) {
webModelFunctions.update(
'myCroftSaid',
'I cannot reply, because I was asked to be quiet.',
);
} else {
myCroft.injectText(data);
}
} else {
tts(`I have no idea what you are talking about.`);
}
tts(`I have no idea what you are talking about.`);
});
socket.on('startROS', () => {
if (webModel.logStreamerRunning) {
Expand Down Expand Up @@ -358,9 +346,6 @@ async function start() {
socket.on('getPersonalData', () => {
socket.emit('personalData', personalData);
});
// socket.on('toggleMycroft', function () {
// myCroft.start();
// });
});
}

Expand Down
5 changes: 2 additions & 3 deletions scripts/dotarlobot/personalDataForBehavior.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
{
"robotName": "Arlobot",
"_comment": "I am using a _ instance of each field for comments.",
"idleTimeoutInMinutes": 15,
"robotName": "Arlobot",
"_idleTimeoutInMinutes": "Use 0 to disable automatic shutdown of ROS and server reset after idle timeout",
"useMyCroft": false,
"idleTimeoutInMinutes": 15,
"_rosLibDelay": "In Seconds. How long to delay between polling ROS for parameters. Decrease to make parameters on the web interface update faster, however it will increase the CPU/Memory load on the system. 5 to 10 is reasonable.",
"rosLibDelay": 5,
"_pushover": "If you use pushover include your tokens here.",
Expand Down
1 change: 1 addition & 0 deletions setup-jazzy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ if [ "$NVM_VERSION" != "$NVM_VERSION_LATEST" ]; then
fi

printf "\n${YELLOW}[Installing and Activating the Latest Node LTS version]${NC}\n"
export NVM_DIR="$HOME/.config/nvm"
# shellcheck source=/home/chrisl8/.nvm/nvm.sh
[[ -s "$NVM_DIR/nvm.sh" ]] && . "$NVM_DIR/nvm.sh" # This loads nvm
nvm install --lts
Expand Down
2 changes: 1 addition & 1 deletion startpm2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fi

# Give the system a moment to finish booting before we come online.
# Adjust as needed, or as you see fit.
# Even as little as 5 or 10 is probably fine, or pick a process to watch, like the mycroft
# Even as little as 5 or 10 is probably fine, or pick a process to watch
# check does above.
sleep 15

Expand Down
Loading

0 comments on commit c943566

Please sign in to comment.