Aditya Nisal
Email : anisal@wpi.edu
Description
Part1:
Objective: To evaluate the forward and inverse kinematics of an RRP robot in gazebo
​
Steps Involved:
-
Subscriber joint_state_sub subscribes to the "/joint_states" topic and gets the joint parameters/values.
-
Transformation Matrix is then calculated based on these joint values.
-
The final pose of the end effector is extracted from the transformation matrix and published on the topic "/forward_kinematics".
​
How to run the code:
-
Launch the RRP bot in gazebo using the command :
-
to launch the forward kinematics node, run: ros2 run kinematics kinematics
-
To get the pose of the end effector, run : ros2 topic echo /forward_kinematics.
​
​
​
​
​
​
​
​
​
​
​
​
Forward Kinematics: SCARA Robot with position reference q1 = 1, q2 = 0.8, d = 0.6
​
​
​
Part2:
Objective: To make the robot move to the position provided by the user as input.
​
Steps Involved:
-
Actual Joint position values are read from the Gazebo Simulator using the joint_states
topic. -
Desired Joint position values are received through the service /input_angles using the
custom srv file created. -
Position and Velocity values for the three joints are received from the position controller.
-
The publisher node publishes the effort using the /forward_effort_controller/command topic.
-
Controllers are designed for each of the three joints using, u = Kpe + (-Kd) eË™ tuning the gains such that the error between the actual and desired position is minimum.
-
A csv file is generated to record the reference and actual joint positions for a period of time and is plotted using Matplotlib.
​
How to run the code:
-
ros2 launch rrbot_gazebo rrbot_world.launch.py
-
ros2 run rrbot_gazebo switch
-
ros2 service call /input_angles force_srv_file/srv/AddForceVectors ”v1:[desired joint positions]”
-
ros2 run robot_controller robot_controller
-
python3 f_plot.py.
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
Joint position from the Gazebo for the revolute joint1 position reference, 4.8
​
​
Part 3: To make the end-effector move with a constant velocity provided by the user.
​
Steps Involved:
-
Calculating the Jacobian and its inverse.
-
Creating the node.
-
Tuning and controller.
-
Plotting
-
Considering Singularities:
​
How to run the code:
-
To spawn the robot
ros2 launch rrbot_gazebo rrbot_world.launch.py
-
To remove the robot from singularity
ros2 run rrbot_gazebo publisher
-
To activate the effort controller
ros2 run rrbot_gazebo switch
-
To start the node
ros2 run velocity_kinematics controller_main
-
To input the desired end effector velocities
ros2 service call /input_velocities force_srv_file/srv/AddForceVectors "{v1:[0.0, 0.1, 0.0]}"
-
To get the current end-effector velocities
ros2 service call /joint_vel srv_file/srv/FoundationsThree "{i1:[0.0, 0.0, 0.0]}"
​
​
​
​
​
​
​
​
​
X, Y and Z velocities of the end effector with respect to time