Answered step by step
Verified Expert Solution
Question
1 Approved Answer
needed detailed solution and clear explanation for all the question below thank you. this uses ros python using ubuntu virtualbox to do it thank you
needed detailed solution and clear explanation for all the question below thank you. this uses ros python using ubuntu virtualbox to do it thank you
Write program(s) with Python API which satisfy the following: Basic requirements: - Define 3 unique poses for the robot arm, namely Point A, B and C. You may decide the 3 points arbitrarily, as long as the robot arm movements between any of the two points are obvious. - The movement the robot arm is only triggered when the user input either A,B or C via one of the terminals, which act as a node called "user_node". - After the movement has been completed, display a message that the robot arm has reached Point A,B or C on one of the terminal. Additional requirements (higher score will be awarded for successfully implementation): - The user_node will first prompt the user to input the correct type of input, i.e. A, B or C through the terminal. If the user input an invalid input, the program will prompt the user to try again. - A more user-friendly input method is to replace the command terminal with a graphical user interface (GUI). Text input can be replaced with clickable buttons and/or radio button for user to select the number of repetitions required. GUI can be created easily with python via various libraries (e.g. Tkinter). You can explore the python library for GUI in the following links: - https://ikegeeks.com/python-gui-examples-tkinter-tutorial/ - https://wiki.python.org/moin/GuiProgramming - If you have opted for the GUI approach, you do not have to write another code for the terminal input approach. Submit your codes as Q3-1 py (Q3-2, Q3-3 etc if more files are created). Explain your implementation clearly in the submission, e.g. what library functions are used, how to use the UI, the communication mode between nodes, topic and message used etc. HINTS: - There are multiple ways to achieve the requirement; one of them is to turn the "move joint" node into to subscriber which listen to a topic. The "user node" can act as the publisher. Upon receiving a message, the "move joint" node will invoke the callback function, which will move the robot arm to the specified position. - Each .py file should only initiate ONE NODE, i.e. rospy.init_node('name of node') should only be used ONCE per python file. - Callback function MUST have an argument even though you are not planning to use it subsequently. For example, the "msg data" in the figure below must be present, regardless if you want to print it via rospy.loginfo. If you do want to use the data which is being passed to the callback function, you will need to address the field within the message. For example, if you want to use "if" function to check if the string received matches a specific string, you can type if msg data.data == "a_specific_string": do something The ".data" must be attached to msg data because it is the "field" specified in the String.msg file (see figure below)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started