In this project, we have a system consisting of four parts in a visual scene that is to be rendered in the RVIZ tool of ROS. The four parts of our system are the base, robot, camera, and object. Every one of these parts has its own coordinate frame attached to it. We use RVIZ tool for visualization purposes, and in RVIZ, we visualize these parts using ROS Markers. The robot, camera, and object are visualized as a cube, arrow, and cylinder, respectively. The base has no visualization marker associated with it, as it solely serves like the base coordinate frame of our system. When you run the project as-is and without filling in your code, you will have some runtime errors because the transformations messages created by the startup code inside of the publish_transforms function (inside the [login to view URL] file) are missing the transform field (for specifying the translation and rotation of the frame). In order to have a minimal working example in RVIZ, you need to add the following lines to every transform message that is created (the example shows how to do this for object_transform message, but you also need to do the same for the rest of the transform messages being published in the publish_transforms function):
object_transform = [login to view URL]() [login to view URL] = [login to view URL]()
object_transform.header.frame_id = "base_frame"
object_transform.child_frame_id = "object_frame" object_transform.transform.translation.x=0 object_transform.transform.translation.y=0 object_transform.transform.translation.z=0 q=tf.transformations.quaternion_from_matrix(tf.transformations.identity_matrix()) object_transform.transform.rotation.x=q object_transform.transform.rotation.y=q object_transform.transform.rotation.z=q object_transform.transform.rotation.w=q
[login to view URL](object_transform)
After adding all the transform fields to the publish_transforms function, you should be able to see all the parts of the system (the cube, arrow, and cylinder) piled up in a single location in RVIZ (please refer to the testing section of this document to learn how to run this workspace.) However, your task is a little more than that. You need to calculate the poses (positions and orientations) of these objects such that the following relationships hold:
1. The transform from the base coordinate frame to the object coordinate frame consists of a rotation expressed as (roll, pitch, yaw) of (0.79, 0.0, 0.79) followed by a translation of 1.0m along the resulting y-axis and 1.0m along the resulting z-axis.
2. The transform from the base coordinate frame to the robot coordinate frame consists of a rotation around the z-axis by 1.5 radians followed by a translation along the resulting y- axis of -1.0m (negative 1.0m).
3. The transform from the robot coordinate frame to the camera coordinate frame must be defined as follows:
a. The translation component of this transform is (0.0, 0.1, 0.1)
b. The rotation component of this transform must be set such that the camera (the
arrow) is pointing directly at the object (the cylinder). In other words, since the arrow head of the arrow marker is aligned with the x-axis of this marker, we need the x-axis of the arrow coordinate frame to point directly at the origin of the cylinder coordinate frame. (Hint: Use the cross product to define the axis of rotation, and the dot product to infer the required rotation angle.)
In the provided startup code of the [login to view URL] file, you need to write a ROS node that publishes the following transforms to tf:
Transformation specifications of the object, robot, and camera, relative to the base frame
• The transform from the base coordinate frame to the object coordinate frame
• The transform from the base coordinate frame to the robot coordinate frame
• The transform from the robot coordinate frame to the camera coordinate frame
For a rotation expressed as roll-pitch-yaw, you can use the quaternion_from_euler() or euler_matrix()
3 freelancers are bidding on average $33 for this job
Hello, I have briefly read the description on ROS Transformations and tf Library , and I can deliver as per the requirements however I need us to discuss for more clarity on the details, deadline and budget as well.