Skip to content

Commit

Permalink
Stripping out more stuff no longer going to support:
Browse files Browse the repository at this point in the history
 - Kinect
 - ASUS xTion
 - XV11
 - Scans Sweep
 - Door monitoring
  • Loading branch information
chrisl8 committed Oct 7, 2024
1 parent c943566 commit d5cef40
Show file tree
Hide file tree
Showing 11 changed files with 2 additions and 295 deletions.
49 changes: 0 additions & 49 deletions arlobot_ros/launch/robot.launch
Original file line number Diff line number Diff line change
Expand Up @@ -12,55 +12,6 @@
<arg name="active3dCamera"
default="$(optenv ACTIVE_3D_CAMERA none)"/> <!-- kinect, asus_xtion_pro -->

<!-- NOTE: ONLY the Asus OR Kinect can be brought up, NOT both at once.-->
<arg name="hasASUSXtion" value="$(optenv HAS_ASUS_XTION false)"/>
<group if="$(arg hasASUSXtion)">
<group if="$(eval arg('active3dCamera') =='asus_xtion_pro')">
<include file="$(find arlobot_ros)/launch/3dsensor.launch">
<arg name="ir_processing" value="false"/>
<arg name="depth_processing" value="false"/>
<arg name="depth_registered_processing" value="false"/>
<arg name="disparity_processing" value="false"/>
<arg name="disparity_registered_processing" value="false"/>
<arg name="scan_processing" value="true"/>
<arg name="3d_sensor" value="asus_xtion_pro"/>
<arg if="$(eval arg('scanTopicSource') =='asus_xtion_pro')" name="scan_topic" value="scan"/>
<arg unless="$(eval arg('scanTopicSource') =='asus_xtion_pro')" name="scan_topic"
value="asus_xtion_pro"/>
</include>
</group>
</group>

<arg name="hasKinect" value="$(optenv HAS_KINECT false)"/>
<group if="$(arg hasKinect)">
<group if="$(eval arg('active3dCamera') =='kinect')">
<include file="$(find arlobot_ros)/launch/3dsensor.launch">
<arg name="ir_processing" value="false"/>
<arg name="depth_processing" value="false"/>
<arg name="depth_registered_processing" value="false"/>
<arg name="disparity_processing" value="false"/>
<arg name="disparity_registered_processing" value="false"/>
<arg name="scan_processing" value="true"/>
<arg name="3d_sensor" value="kinect"/>
<arg if="$(eval arg('scanTopicSource') =='kinect')" name="scan_topic" value="scan"/>
<arg unless="$(eval arg('scanTopicSource') =='kinect')" name="scan_topic"
value="kinect"/>
</include>
</group>
</group>

<arg name="loadxv11" value="$(optenv HAS_XV11 false)"/>
<group if="$(arg loadxv11)">
<include file="$(find arlobot_ros)/launch/xv11.launch">
<arg if="$(eval arg('scanTopicSource') =='xv11')" name="scan_topic" value="scan"/>
</include>
</group>

<arg name="loadScanseSweep" value="$(optenv HAS_SCANSE_SWEEP false)"/>
<group if="$(arg loadScanseSweep)">
<include file="$(find arlobot_ros)/launch/sweep.launch"/>
</group>

<arg name="loadRPLIDAR" value="$(optenv HAS_RPLIDAR true)"/>
<group if="$(arg loadRPLIDAR)">
<include file="$(find arlobot_ros)/launch/rplidar.launch"/>
Expand Down
2 changes: 0 additions & 2 deletions cypress-tests/cypress/e2e/0-2-siteStartupLayout.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,7 @@ describe("site initial layout and page function", () => {
cy.contains("camera0fpsForWeb:").should("be.visible");
cy.contains("camera1:").should("be.visible");
cy.contains("camera1name:").should("be.visible");
cy.contains("monitorDoors:").should("be.visible");
cy.contains("hasXboxController:").should("be.visible");
cy.contains("arlobotModel:").should("be.visible");
cy.contains("hasActivityBoard:").should("be.visible");
cy.contains("hasQuickStartBoard:").should("be.visible");
cy.contains("speechVolumeLevelDefault:").should("be.visible");
Expand Down
65 changes: 0 additions & 65 deletions node/doorClosed.js

This file was deleted.

5 changes: 0 additions & 5 deletions node/rosInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@ const rosParameters = {
label: 'ignoreFloorSensors',
path: '/arlobot/ignoreFloorSensors',
},
monitorDoors: {
param: webModel.rosParameters.monitorDoors,
label: 'monitorDoors',
path: '/arlobot/monitorDoors',
},
mapName: {
param: webModel.rosParameters.mapName,
label: 'mapName',
Expand Down
40 changes: 0 additions & 40 deletions scripts/check_hardware.sh
Original file line number Diff line number Diff line change
Expand Up @@ -160,26 +160,6 @@ check_hardware() {
fi
fi

# XV-11
if [[ $(jq '.hasXV11' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
echo "Checking XV11"
if ! "${SCRIPT_DIR}/find_XVLidar.sh" | grep ACM &>/dev/null; then
FAILURE_REASON="XV-11 missing!"
CHECK_GOOD=false
return 1
fi
fi

# Scanse Sweep
if [[ $(jq '.hasScanseSweep' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
echo "Checking Scanse Sweep"
if ! "${SCRIPT_DIR}/find_ScanseSweep.sh" | grep ttyUSB &>/dev/null; then
FAILURE_REASON="Scanse Sweep missing!"
CHECK_GOOD=false
return 1
fi
fi

# RPLIDAR
if [[ $(jq '.hasRPLIDAR' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
echo "Checking RPLIDAR"
Expand All @@ -189,26 +169,6 @@ check_hardware() {
return 1
fi
fi

# ASUS xtion
if [[ $(jq '.hasASUSXtion' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
echo "Checking ASUS Xtion Pro"
if ! /usr/bin/lsusb | grep ASUS &>/dev/null; then
FAILURE_REASON="ASUS Xtion missing!"
CHECK_GOOD=false
return 1
fi
fi

# Kinect
if [[ $(jq '.hasKinect' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
echo "Checking Kinect"
if ! /usr/bin/lsusb | grep "Microsoft Corp. Xbox NUI Camera" &>/dev/null; then
FAILURE_REASON="Kinect missing!"
CHECK_GOOD=false
return 1
fi
fi
}

check_hardware
Expand Down
15 changes: 0 additions & 15 deletions scripts/dotarlobot/personalDataForBehavior.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,8 @@
"camera1": false,
"_camera1name": "Run 'fswebcam --verbose --device=/dev/video1 2>&1|grep cap.card' and set this to a unique part of the resulting string.",
"camera1name": "HP",
"_monitorDoors": "Set to true if you want the robot to monitor a door server for open doors",
"monitorDoors": false,
"doorServerIP": "127.0.0.1",
"_doorName": "Name of door to check.",
"doorName": "StairsAreNotGoodForDaleks",
"_hasXboxController": "Set to true if you have a USB wireless xBox joystick receiver.",
"hasXboxController": false,
"_arlobotModel": "Use this to use an alternate URD file, otherwise use set to default",
"arlobotModel": "default",
"_hasActivityBoard": "This can only be false for a 'dummy' test system that has no actual hardware.",
"hasActivityBoard": true,
"_hasQuickStartBoard": "My robot has a SECOND Propeller board called 'Quick Start Board' that runs the PING sensors.",
Expand Down Expand Up @@ -99,16 +92,8 @@
},
"maxPingRangeAccepted": 0.5,
"socketEmitterThrottle": 500,
"_hasASUSXtion": "Set to true if you have an ASUS Xtion connected.",
"hasASUSXtion": false,
"_hasKinect": "Set to true if you have an Kinect connected.",
"hasKinect": false,
"_active3dCamera": "Only one of kinect or asus_xtion_pro can be active.",
"active3dCamera": "None",
"_hasXV11": "Set to true if you have an XV11 Neato scanner installed on the robot.",
"hasXV11": false,
"_hasScanseSweep": "Set to true if you have a Scanse Sweep installed on the robot.",
"hasScanseSweep": false,
"_hasRPLIDAR": "Set to true if you have a Slamtec RPLIDAR installed on the robot.",
"hasRPLIDAR": false,
"_rplidarBaudrate": "115200 for A1 and A2, 256000 for A3",
Expand Down
2 changes: 0 additions & 2 deletions scripts/model-robot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@
# I use this to work on the model from my desktop,
# instead of having to do it from the laptop on the robot.
export ROS_MASTER_URI=http://localhost:11311
ARLOBOT_MODEL=$(jq '.arlobotModel' "${HOME}/.arlobot/personalDataForBehavior.json" | tr -d '"')
export ARLOBOT_MODEL
ros2 launch --debug arlobot_ros model_robot.launch.py
32 changes: 2 additions & 30 deletions scripts/ros_prep.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,6 @@ export SCAN_TOPIC_SOURCE
ACTIVE_3D_CAMERA=$(jq -r '.active3dCamera' "${HOME}/.arlobot/personalDataForBehavior.json")
export ACTIVE_3D_CAMERA

if [[ $(jq '.hasASUSXtion' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
export HAS_ASUS_XTION=true
fi

if [[ $(jq '.hasKinect' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
export HAS_KINECT=true
fi

if [[ $(jq '.hasXV11' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
"${SCRIPTDIR}/XVLidar.sh" start
export HAS_XV11=true
XV11_SERIAL_PORT=$("${SCRIPTDIR}/find_XVLidar.sh")
export XV11_SERIAL_PORT
fi

if [[ $(jq '.hasScanseSweep' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
export HAS_SCANSE_SWEEP=true
SCANSE_SWEEP_SERIAL_PORT=$("${SCRIPTDIR}/find_ScanseSweep.sh")
export SCANSE_SWEEP_SERIAL_PORT
fi

if [[ $(jq '.hasRPLIDAR' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
export HAS_RPLIDAR=true
RPLIDAR_USB_PORT=$("${SCRIPTDIR}/find_RPLIDAR.sh")
Expand All @@ -70,9 +49,6 @@ else
export HAS_RPLIDAR=false
fi

ARLOBOT_MODEL=$(jq '.arlobotModel' "${HOME}/.arlobot/personalDataForBehavior.json" | tr -d '"')
export ARLOBOT_MODEL

if [[ ! -d ${HOME}/.arlobot/status/ ]]; then
mkdir "${HOME}/.arlobot/status/"
fi
Expand All @@ -93,11 +69,6 @@ ros2 param set /parameter_blackboard mapname empty

ros2 param set /parameter_blackboard maxPingRangeAccepted "$(jq '.maxPingRangeAccepted' "${HOME}/.arlobot/personalDataForBehavior.json")"

if [[ $(jq '.monitorDoors' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
ros2 param set /parameter_blackboard monitorDoors "$(jq '.monitorDoors' "${HOME}/.arlobot/personalDataForBehavior.json")"
echo "Door sensing is on. If robot will not move, check doors."
fi

if [[ $(jq '.hasActivityBoard' "${HOME}/.arlobot/personalDataForBehavior.json") == true ]]; then
ros2 param set /parameter_blackboard arlobot/port "$("${SCRIPTDIR}/find_ActivityBoard.sh")"
else
Expand All @@ -110,7 +81,8 @@ if [[ $(jq '.hasXboxController' "${HOME}/.arlobot/personalDataForBehavior.json")
export HAS_XBOX_JOYSTICK=true
# /dev/input/js0 is the default is nothing is provided.
if [[ $("${SCRIPTDIR}/find_xbox_controller.sh") ]]; then
export JOY_DEVICE="$("${SCRIPTDIR}/find_xbox_controller.sh")"
JOY_DEVICE="$("${SCRIPTDIR}/find_xbox_controller.sh")"
export JOY_DEVICE
fi
fi

Expand Down
2 changes: 0 additions & 2 deletions scripts/start-arlobot-only.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,4 @@ source "${SCRIPTDIR}/ros_prep.sh"

echo "Use kill_ros.sh to close."

ARLOBOT_MODEL=$(jq '.arlobotModel' "${HOME}/.arlobot/personalDataForBehavior.json" | tr -d '"')
export ARLOBOT_MODEL
ros2 launch arlobot_ros minimal.launch.py
81 changes: 0 additions & 81 deletions website/src/components/ScanSource.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,89 +10,8 @@ const ScanSource = (props) => {
</CardHeader>
<Collapse id="video-card-body" isOpen={props.isOpen}>
<CardBody>
{props.personalData.hasASUSXtion && props.personalData.hasKinect && (
<>
<strong>Active 3D Camera</strong>
<br />
<button
id="activate-asus_xtion_pro"
type="button"
className={
props.personalData.active3dCamera === 'asus_xtion_pro'
? 'btn btn-primary'
: 'btn btn-default'
}
>
ASUS Xtion
</button>
<button
id="activate-kinect"
type="button"
className={
props.personalData.active3dCamera === 'kinect'
? 'btn btn-primary'
: 'btn btn-default'
}
>
Kinect
</button>
<hr />
</>
)}
<strong>Scan Topic Source</strong>
<br />
{props.personalData.hasASUSXtion && (
<button
id="asus_xtion_pro"
type="button"
className={
props.personalData.scanTopicSource === 'asus_xtion_pro'
? 'btn btn-primary'
: 'btn btn-default'
}
>
ASUS Xtion
</button>
)}
{props.personalData.hasKinect && (
<button
id="kinect"
type="button"
className={
props.personalData.scanTopicSource === 'kinect'
? 'btn btn-primary'
: 'btn btn-default'
}
>
Kinect
</button>
)}
{props.personalData.hasXV11 && (
<button
id="xv11"
type="button"
className={
props.personalData.scanTopicSource === 'xv11'
? 'btn btn-primary'
: 'btn btn-default'
}
>
XV11 Neato
</button>
)}
{props.personalData.hasScanseSweep && (
<button
id="scanse"
type="button"
className={
props.personalData.scanTopicSource === 'scanse'
? 'btn btn-primary'
: 'btn btn-default'
}
>
Scanse Sweep
</button>
)}
{props.personalData.hasRPLIDAR && (
<button
id="rplidar"
Expand Down
Loading

0 comments on commit d5cef40

Please sign in to comment.