Skip to content

menayal/lunabotics_rqt_23_UI

Repository files navigation

lunabotics_rqt_23_UI

This is the package that will hold all of the UI's components.

Install instructions

Clone this package into your src folder in your workspace:

  • Move into your src folder (if your workspace is named catkin_ws)
    • cd ~/catkin_ws/src/
  • The src folder is where any and all packages you create or install are placed
  • Install the package
    • HTTPS:
      • git clone https://github.com/menayal/lunabotics_rqt_23_UI.git
    • or SSH:
      • git clone git@github.com:menayal/lunabotics_rqt_23_UI.git
  • Move back to your catkin_ws parent directory and run catkin_make
    • cd ~/catkin_ws/
    • catkin_make

The package is now installed

View the UI

  • Make sure you have the associated robot code.
  • roslaunch gen2bot allMotors.launch
    • You will not get it running with no errors since you are not connected to the robot, but you can still run the code for development
  • roslaunch lunabotics_rqt_23_UI viewUI.launch

Notes

  • To begin, make sure you have a UI created in QT Designer. If you have ROS already installed, QT designer is already on your machine.

  • QT Designer allows you to place buttons, labels, forms, etc.. onto a pane. You can use this application to also move and arrange things.

  • Once the .ui file is created. we can view it in rqt by entering this command in the terminal: rqt

  • Open up all your plugins that you want to save by hitting plugins and select from the dropdown. Arrange them however you like. When completed, go to the perspectives tab and hit export and put it into its own folder.

  • You can also edit the rviz plugin config by adding your desired topics then saving them in their desired location.

  • Core application is stored in the src/lunabotics_rqt_23_UI/ directory

    • All the logic is completed in my_module.py. Take a look at the interfaceEdits branch for more recent changes.
      • Note the imports on line 7. Make sure the import the appropriate methods or objects that your UI will use.
      • Once its created, you can associate the UI with line 39. The last argument being the .ui file name.
      • Our plugin uses labels so all we have is a bunch of labels that are being set to different values of data.
      • The key part of this whole process was getting dynamic data updates on the actual plugin.
        • Lines 55 - 194 show how to subscribe to a topic and receive information from it.
          • Ignore lines 61 - 63
        • Using rosparam's allow us to easily get data that is available in the ROS network.
    • init.py is where the application starts up. This tells the computer where to begin running.
    • Ignore the .pyc (autogenerated), someting.py, and talker.py files.
  • To actually launch this we use viewUI.launch. This launch file opens a perspectives file that houses the location of the UI.

  • Make sure to launch or start the package that houses the data that you are retrieving. If you do not start the package, you will not be able to see the UI and will be met with errors in the terminal. Your plugin will not display in rqt.

About

User interface for the NASA Lunabotics 2023 Robot

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published