I found the answer to be quite simple actually. Basically #include <sensor_msgs/Joy.h> instead of #include<ros/Joy.h>
I found the answer to be quite simple actually. Basically #include <sensor_msgs/Joy.h> instead of #include<ros/Joy.h> within your .cpp files.