A Python-based trial management interface for haptic environment experiments. This application provides a graphical interface for controlling and monitoring haptic experiments, including data collection, trial management, and real-time feedback.
- Graphical user interface for experiment control
- Real-time haptic data streaming and visualization
- Trial management and configuration
- Data logging capabilities (EMG, motion capture)
- MongoDB integration for data storage
- Support for multiple haptic devices
- Configurable experiment states and transitions
- Windows 10 or later
- Python 3.11
- Haptic device(s) (compatible with the system)
- MongoDB server (for data storage)
- Install uv:
# Install uv using PowerShell
iwr https://astral.sh/uv/install.ps1 -useb | iex
# Add uv to PATH
$env:Path = "$env:USERPROFILE\.local\bin;$env:Path"
- Create and activate environment:
# Create new venv with Python 3.11
uv venv --python 3.11
# Activate venv
.\.venv\Scripts\activate.ps1
# Install dependencies
uv pip install -r requirements.txt
- Start the RPC server first (required for communication)
- Run the application:
python taskControl.py
-
Configure the experiment:
- Set subject name
- Choose save directory
- Select configuration file
- Configure recording options (EMG, motion capture)
-
Control the experiment:
- Start/Stop trials
- Pause/Resume as needed
- Monitor real-time data
- View trial records
The application uses several configuration files:
Globals.py
: Network and system settingsmessageDefinitions.py
: Message protocols- Trial configuration files in
trialConfig/
directory
The system supports:
- Haptic data streaming
- EMG data recording
- Motion capture data
- Trial metadata
- MongoDB storage integration
-
Connection Issues:
- Ensure RPC server is running
- Check network settings in
Globals.py
- Verify firewall settings
-
Virtual Environment Issues:
- If activation fails, try running PowerShell as administrator
- Ensure Python is in PATH
- Try recreating the virtual environment
-
Data Collection Issues:
- Verify device connections
- Check MongoDB connection
- Review log files
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
[Add your license information here]
To create a standalone executable (.exe) file:
- Ensure all dependencies are installed:
pip install -r requirements.txt
- Build the executable:
pyinstaller taskControl.spec
The executable will be created in the dist
directory as HapticEnvironment.exe
. This executable includes all necessary dependencies and can be run on any Windows system without requiring Python installation.
Note: The first build might take several minutes as it packages all dependencies.