联系我们: 手动添加方式: 微信>添加朋友>企业微信联系人>13262280223 或者 QQ: 1483266981
Manchester Centre for Robotics & AI
ROS Nodes, Services and Robotic Implementation
Problem Statement
Consider a differential drive robot with wheel radius ∈ (0, ∞) and distance between
wheels ∈ (0, ∞). Consider that each wheel can be independently controlled with linear
velocity signals
( ),
( ) ∈ [ 0.1, 01] for the left and right wheels respectively.
The wheels are designed in such a way that when
( ) =
( ) > 0, the robot moves
towards its x axis. The sampling time of the robot wheel controllers is = 0.01.
Figure 1 shows the mechanical arrangement for a simple differential drive robot. All
units are in SI base, i.e. seconds, meters, radians, etc.
Package, Node Naming, and Parameters
The naming used for the robot must be the one assigned to you adjusted as follows.
For example, suppose that the name assigned to you was RobotName.
robot_prefix = robot_name
package_name = robot_name_controller
node_name = robot_name_control_node
In addition, notice that and are assigned to you in your spreadsheet row.
Figure 1 – Schematic of an example differential drive robot
2 | P a g e
Assessment
This coursework is worth 25% of the total unit marks and it is therefore expected that it
will take students up to 25 hours to complete.
Create an ament_python package called package_name containing a node called
node_name that does the task described below. For your own testing, you might want
to also implement a pairing robot node.
1. Turn on the robot by using its robot_prefixon_off service. Note that the
robot takes an unspecified amount of seconds to turn on, hence you must wait for
the service to return successfully before sending/receiving valid information
to/from the robot.
2. Subscribe to the robot_prefixgetpose topic which uses
geometry_msgs/msg/PoseStamped messages, which holds the pose of the
robot. It contains the current x y position and z axis orientation about the
world-reference frame using two fields.
Namely, pose.position,
has the and positions with respect to the world-reference frame, with = 0.
Furthermore, the field pose.orientation is the quaternion representing its
orientation,
where = cos (
2
( )
) , = sin (
2
( )
), and = = 0. Notice that
( ) is the
z axis orientation of the mobile robot frame with respect to the world-reference
frame.
3. Using the current pose information, calculate the desired wheel velocities and
publish them to the topic robot_prefixsetwheel_velocities as a
robot_prefix_msgs/msg/wheel_velocities message, implemented as
shown below. For your own testing, you must implement the
robot_prefix_msgs yourself strictly defined below.
4. The robot must move from its initial pose, (0) with respect to the world-
# This contains the position of a point in free space
float64 x
float64 y
float64 z
# This contains the position of a point in free space
float64 x
float64 y
float64 z
float64 w
# Wheel Velocity definition
# Right Wheel
float64 vr
# Left Wheel
float64 vl
3 | P a g e
reference frame, to the target position with respect to the world-reference
frame, as assigned to you. When the robot’s frame is at least within 5 cm from ,
the robot must be turned off using its robot_prefixon_off service. The final
orientation of the robot is irrelevant as long as the desired position has been
reached.
5. The trivial “planning” algorithm described below is recommended for this
assignment. You are welcome to implement another planning strategy as long as
the objective is met.
a. Rotate the robot about its z axis to align its positive x axis with
i. How do you move the wheels such that the robot spins about its
z axis without changing its position
ii. How do you know that the current x axis direction of the robot is
aligned with
b. Move the robot straight towards until the desired threshold is met.
i. How do you move the wheels such that the robot moves in a
straight line
ii. How do you define when has approached enough to to stop
the robot
Additional Notes
1. Your controller will be considered to have finished the task when the robot is
turned off. Do not turn it off for other reasons.
2. Assume that the mobile robot has a maximum of two minutes of battery, hence, it
will be automatically turned off after 2 minutes of activity.
3. Your package must compile using colcon.
4. Correctly understanding instructions is part of the evaluation. If unsure, ask for
further guidance. No
5. guidance will be given if it is perceived to give an individual unfair advantage in
the assignment.
6. Wheel velocities above or below the specified thresholds will be clamped silently
by the internal robot node.
Submission
There will be an assignment submission link in the ‘Assessment and Feedback’ section of
the Software for Robotics Blackboard area. You will need to upload a compressed folder
in the specific format below. This includes file arrangement and naming. Automated
marking will be used to assess your submission. Failure to comply to the naming and
structure requirements may lead to lost or zero marks. Other packages and files which
are included will be automatically removed during evaluation
coursework1_YOUR8DIGITID.zip
└── robot_name_controller
The submission deadline is Monday 6th November 2023 at 13:00.
Mitigating Circumstances
Any mitigating circumstance requests should be directed to the Teaching Office.
MMM & AW
Issue 1.0
06/09/2023
4 | P a g e


发表评论