I started with the roscopter to connect my pixhawk to ROS.
I use the rosbuild version: https://code.google.com/p/roscopter/
Everything is working fine with making my own Pixhawk firmware and roscopter communication, but now I am trying to add a new MAVmessage trough the telemetry and correspondingly a new ROStopic.
When I adapted the scripts, builded and uploaded everything I get no errors.
I followed the following steps to modify my files (assuming the normal roscopter-apm connection is working fine):
1) Adapted ArduCopter/GCS_Mavlink.pde
2) Adapted libraries/GCS_Mavlink/GCS.h 3) Adapted libraries/GCS_Mavlink/message_definitions/common.xml
4) In Ardupilot directory:
5)In ArduCopter directory: make configure
) make px4-v2
7) make px4-v2-upload
8) Go to roscopter directory
9) Adapt mavlink/message_definitions/v1.0/common.xml
11) In msg directory: add message file (ultrason.msg)
12) In roscopter directory: rosmake
13) In mavlink directory:
./pymavlink/generator/mavgen.py --output pymavlink/dialects/v10/ardupilotmega.py message_definitions/v1.0/ardupilotmega.xml
14) In roscopter directory: roscore
15) In new terminal and roscopter directory:
rosrun roscopter roscopter.py --device=/dev/ttyACM0 --baudrate=115200
The connection works fine as all ROS topics are published and when I "echo" vfr-hud" for instance, I get periodicaly new values as expected.
But when I echo "ultrason" (my new message, based on vfr_hud), it is empty, which is strange as I adapted the arducopter code so that it would transfer the same values as for vfr_hud...
I suspect that the problem is on the ardupilot side, so I attached my adapted files.
Does anyone know what the problem could be?