Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Submission: Your source code - entire your package folder ( exclude other folders besides root src ) Example Folder Structures homework _ ws src package
Submission:
Your source code entire your package folder exclude other folders besides root src
Example Folder Structures
homeworkws
src
package
package
Screen recording video of how everything runs and show some example input
Submission format: format violation will cause some point penalty
Filename : hwyourname.zip
Details
Create simple calculator base on ROS Services and Topic based communication
Requirement:
The calculator will have type of operation,
Plus
Minus
Divide
Multiply
Create a Node that allow user to input their name send numbers and operator as input through terminal Both Service Client and Publisher will be in one single script
Example Input:
ros run calculatordemo calculatorclient "Shawn"
Service Client:
Send numbers, current system time and operator
Publisher:
Send username through username topic
Create a Node that holds the core logic of the calculator operation listed above. Both Service Server and Subscriber will be in one single script
Example Output:
ShawnCurrent Time: ::Displaied Decimal: : Received a Input that sent at :: The calculation result is:
Service Server:
Receive:
The number input, senders system time, operator
Return:
Current system time
Subscriber:
Receive username
Create a ros parameters called decimal that controls how many decimal will be printed in the output Think about where do you need to put it
Example Input ros param set calculatordemo decimal
this will make
Example Input ros param set calculatordemo decimal
this will make
Hints:
You will need to create your custom service message
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