Launch packages from HMI display menu Entry "My Program"#13
Launch packages from HMI display menu Entry "My Program"#13sumedhreddy90 wants to merge 3 commits intoturtlebot:mainfrom
Conversation
|
[TODO] Launch multiple launch files one after the other |
kscottz
left a comment
There was a problem hiding this comment.
Something seems really fishy here. I think you may have over-complicating or over-thinking how this could happen. Alternatively I may not have a sufficient understanding of the situation.
I found a few things I think are suspect:
- I don't understand why this PR has copies of an existing package's messages.
- It is unclear to me why you are using subprocess to kick off a launch file.
- Is there a second pull request that updates the turtlebot4 menu with menu options?
- How are students supposed to add their project to this node.
I don't understand why we can't make a set of simple menu items on the TurtleBot screen and those options issue a message. On the lesson side a simple node that listens for those messages and triggers a student project (using a message / service call/ or action call) should be sufficient.
Let's find some time to chat on Monday.
projects/hmi_simulation_project_manager/hmi_simulation_project_manager/manager.py
Show resolved
Hide resolved
| # Then return Success message upon successful request exectution | ||
| if(request.my_program_on): | ||
| self.get_logger().info('My Program Mode is turned on') | ||
| subprocess.call(["bash", '/home/sumedh/workspace/src/TurtleBot4Lessons/projects/hmi_simulation_project_manager/config/auto_launch.bash']) |
There was a problem hiding this comment.
Uhhhhhhhhhhhh. This is a hard coded path. I am not sure how I feel about calling subprocess to run a script from inside a node.
Did you follow this pattern from someone else? At bare minimum the bath needs to be relative.
There was a problem hiding this comment.
removed the hardcode path. I generally prefer going with relative path. However, the relative path isnt working. Hence, during testing, I used the complete path. In my recent commits, I changed it to relative path.
Yes, calling subprocess to run a script is possible and is friendly. Please refer to one of the implementation by Tully foote and Alejandro in one of their repo's.
https://github.com/osrf/drone_demo/blob/master/sitl_launcher/scripts/launch_drone_ros2.py
Please refer to line number 172
| @@ -0,0 +1,29 @@ | |||
| from setuptools import setup | |||
There was a problem hiding this comment.
It is unclear to me what this is for. Why does a ROS node need a setup.py file?
There was a problem hiding this comment.
Please refer to https://docs.ros.org/en/galactic/Tutorials/Intermediate/Launch/Launch-system.html. This import is an inbuilt packages used to setup the ROS2 package. This is generated when we create a new ROS2 package ros2 pkg create --build-type ament_python <package_name>
| @@ -0,0 +1,76 @@ | |||
| from asyncio import FastChildWatcher | |||
| import string | |||
| from tkinter.messagebox import NO | |||
There was a problem hiding this comment.
You seem to have a lot of extra import statements that aren't used.
There was a problem hiding this comment.
These imports seems to be like auto generated by visual studio code. I will remove them
| description='Goal position in X and Y coordinates')] | ||
|
|
||
|
|
||
| def generate_launch_description(): |
There was a problem hiding this comment.
My understanding of launch isn't that great. Can you explain a bit about what is going on here?
There was a problem hiding this comment.
Here, In this example, as a sample I am firing Nodes required for running motion planner algorithm. The TODO is that the program manager launch will make sure to maintain a queue of all student packages. Which inturn executes one by one in the Queue. This needs to be discussed on how to architect it.
I removed the turtlebot4_msgs from the projects folder. That was an uncertain commit. |
Please refer to the below pull request |
This PR enables users to launch their program/ programs from HMI display of TB4 by pressing "My Program" on the available menu list.
Usage:
Note:
Add Menu Entry to HMI display "My Program" turtlebot4#24