Complete rewrite of the old arm code. Currently, only command that is implemented is set_motor_speeds.
It takes 6 floats, and works as follows:
The first four are PWM values, [-255, 255] for the DC motors. The last two are for the servos, in RPM
Also, now sending messages back from a teensy to the OBC has been fixed and seems to be working. I have also added CommsNodeLocalTest.py , which is a version of commsnode that uses USB. You will need to change the serial port on it for it to work. It is using this that I have tested messages sending back to the obc.
The arm now sends back an message with ID 1 as a pong, and a message with ID 0 as a debug string when it encounters an invalid command.
Then, send a set motor speed command over serial to the Arm teensy. For instance, if the attached sketch simulate-sending-motors.zip - is run in a teensy, which has Serial 1 connected to Serial 1 of the primary teensy, and grounds are connected - it will cause the first four motors, on pins 9, 5, 10, and 6, to pulse in sequence.
For the OBC things:
Compile and upload the Arm code, but in ArmDebug.h, uncomment #define DEBUG.
In CommsNodeLocalTest, change line 225 with the serial port of your Teensy - change it from /dev/ttyACM0 to the one you see in Arduino IDE.
Run ros master with roscore
Run this node with rosrun mcu_control CommsNodeLocalTest.py
In another terminal, run rostopic echo /arm_feedback
In another terminal, run rostopic pub /arm_command std_msgs/String "data: 'ping'" you should see the LED on the teensy blink, and a pong response in arm_feedback
Run rostopic pub /arm_command std_msgs/String "data: 'debug_test'" You should see data: "This is a debug string" in arm_feedback
Run rostopic pub /arm_command std_msgs/String "data: 'set_motor_speeds 255 0 0 0 0 0'" -r 11 if you plug a light into pin 9, you should see it light up.
The approval from all software team leads is necessary before merging.
Reviewer Section
Aside from local testing and the General Integration Test it is implied that static analysis should be included in the verification process.
Assignee Section
Description
Complete rewrite of the old arm code. Currently, only command that is implemented is set_motor_speeds. It takes 6 floats, and works as follows:
Also, now sending messages back from a teensy to the OBC has been fixed and seems to be working. I have also added CommsNodeLocalTest.py , which is a version of commsnode that uses USB. You will need to change the serial port on it for it to work. It is using this that I have tested messages sending back to the obc.
The arm now sends back an message with ID 1 as a pong, and a message with ID 0 as a debug string when it encounters an invalid command.
Steps for Testing
For the OBC things:
#define DEBUG
./dev/ttyACM0
to the one you see in Arduino IDE.roscore
rosrun mcu_control CommsNodeLocalTest.py
rostopic echo /arm_feedback
rostopic pub /arm_command std_msgs/String "data: 'ping'"
you should see the LED on the teensy blink, and a pong response in arm_feedbackrostopic pub /arm_command std_msgs/String "data: 'debug_test'"
You should seedata: "This is a debug string"
in arm_feedbackrostopic pub /arm_command std_msgs/String "data: 'set_motor_speeds 255 0 0 0 0 0'" -r 11
if you plug a light into pin 9, you should see it light up.The approval from all software team leads is necessary before merging.
Reviewer Section
Aside from local testing and the General Integration Test it is implied that static analysis should be included in the verification process.
For Pull Requests that do not include code changes, it is not required to perform the tests above.