You never initialize rd_hardwareMap
Also next time, the contents of the stack trace would be useful to post
Typically, the 2nd line of a stack trace tells you which line caused the exception. For example, if you have code like
Code:
class MyClass {
Object thing = null;
public void init() {
thing.toString();
}
public static void main (String[] args) {
new MyClass().init();
}
}
and you get
Code:
Exception in thread "main" java.lang.NullPointerException
at MyClass.init(Main.java:5)
at MyClass.main(Main.java:9)
You know that line 5 caused the error, which is
NullPointerExceptions occur when you try to access a field or method of an object that is null. In this case, we try to access a method on thing. That must mean thing is null.
It's also sometimes helpful to use a Java debugger. I'm not sure how FTC programming works but if you have a debugger available, you should use it. It will break (pause the program) on exceptions and let you inspect the contents of all the variables at that point.