Not able to request GPS_DATA_ADVANCED

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Not able to request GPS_DATA_ADVANCED

Jeroen.van.Emden
I am trying to request to LL_status, RC_data, Controller_output, IMU_rawdata, IMU_calcdata, gps_data and gps_data_advanced.
SerialInterface::getPackets
  Requesting 029f 7 packets
The bitset returns the correct hex value (as can be seen above). However it is not possible to get the gps_data_advanced.
  Read successful: type = 35, crc = 18650
  Packet type is GPS_DATA
  SerialInterface::getPacket()
Timeout: 0 bytes available 3 bytes requested
    dev: 3
    Error Reading Packet Header: 
: Resource temporarily unavailable
    Read (-1): 
  Read failed

What is going wrong?
Reply | Threaded
Open this post in threaded view
|

Re: Not able to request GPS_DATA_ADVANCED

Bill Morris
Administrator
If you are using the latest version from our git repo I would try
polling at a lower frequency. Also you can improve performance by using
the offset feature to poll lower priority data at a lower frequency
while polling more critical data at a higher frequency.

For example
    <param name="freq" value="10.0"/>

    <param name="enable_RC_DATA" type="bool" value="true"/>
    <param name="interval_RC_DATA" type="int" value="2"/>
    <param name="offset_RC_DATA" type="int" value="0"/>

    <param name="enable_GPS_DATA_ADVANCED" type="bool" value="true"/>
    <param name="interval_GPS_DATA_ADVANCED" type="int" value="2"/>
    <param name="offset_GPS_DATA_ADVANCED" type="int" value="1"/>

An interval of 2 will cause it to poll every other request setting both
of them to a 20Hz update rate, and an offset of 0 will cause it to
update RC_DATA on even updates and GPS_DATA_ADVANCED on odd updates.

IIRC the best I was able to get without errors is 10Hz via serial and
20Hz via zigbee.

On Mon, 2011-01-31 at 07:28 -0800, Jeroen.van.Emden [via asctec-users]
wrote:

> I am trying to request to LL_status, RC_data, Controller_output,
> IMU_rawdata, IMU_calcdata, gps_data and gps_data_advanced.
> SerialInterface::getPackets
>   Requesting 029f 7 packets
>
> The bitset returns the correct hex value (as can be seen above).
> However it is not possible to get the gps_data_advanced.
> Read successful: type = 35, crc = 18650
>   Packet type is GPS_DATA
>   SerialInterface::getPacket()
> Timeout: 0 bytes available 3 bytes requested
>     dev: 3
>     Error Reading Packet Header:
> : Resource temporarily unavailable
>     Read (-1):
>   Read failed
>
>
> What is going wrong?
>
>
> ______________________________________________________________________
> If you reply to this email, your message will be added to the
> discussion below:
> http://asctec-users.986163.n3.nabble.com/Not-able-to-request-GPS-DATA-ADVANCED-tp2389713p2389713.html 
> To start a new topic under asctec-users, email ml-node
> +[hidden email]
> To unsubscribe from asctec-users, click here.


Reply | Threaded
Open this post in threaded view
|

Re: Not able to request GPS_DATA_ADVANCED

Jeroen.van.Emden
I changed the code a bit and got it working.
	char cmd[6];
	short req,n1,n2;req = (short) requestPackets_.to_ulong ();

	n1 = (req & 0xff);
	n2 = (req & 0xff00) >> 8;
	sprintf (cmd, ">*>p%c%c", n1,n2);

Maybe the problem is the fact that I am not using ROS, but my own c++ program.
Reply | Threaded
Open this post in threaded view
|

Re: Not able to request GPS_DATA_ADVANCED

Bill Morris
Administrator
On Wed, 2011-02-02 at 01:31 -0800, Jeroen.van.Emden [via asctec-users]
wrote:
> I changed the code a bit and got it working.
> char cmd[6];
> short req,n1,n2;req = (short) requestPackets_.to_ulong ();
>
> n1 = (req & 0xff);
> n2 = (req & 0xff00) >> 8;
> sprintf (cmd, ">*>p%c%c", n1,n2);

Thanks, I'll look at patching this tomorrow.

> Maybe the problem is the fact that I am not using ROS, but my own c++
> program.

It shouldn't be difficult to make most of the asctec_autopilot code
independent of ROS. If there is a need I can look at breaking it out as
a separate library.



Reply | Threaded
Open this post in threaded view
|

RE: Not able to request GPS_DATA_ADVANCED

Jeroen.van.Emden
The only difficulty I currently have is to create a good working polling loop.


From: Bill Morris [via asctec-users] [mailto:[hidden email]]
Sent: woensdag 2 februari 2011 22:56
To: Emden, Jeroen van
Subject: Re: Not able to request GPS_DATA_ADVANCED

On Wed, 2011-02-02 at 01:31 -0800, Jeroen.van.Emden [via asctec-users]
wrote:
> I changed the code a bit and got it working.
> char cmd[6];
> short req,n1,n2;req = (short) requestPackets_.to_ulong ();
>
> n1 = (req & 0xff);
> n2 = (req & 0xff00) >> 8;
> sprintf (cmd, ">*>p%c%c", n1,n2);

Thanks, I'll look at patching this tomorrow.

> Maybe the problem is the fact that I am not using ROS, but my own c++
> program.

It shouldn't be difficult to make most of the asctec_autopilot code
independent of ROS. If there is a need I can look at breaking it out as
a separate library.






If you reply to this email, your message will be added to the discussion below:
http://asctec-users.986163.n3.nabble.com/Not-able-to-request-GPS-DATA-ADVANCED-tp2389713p2409122.html
To start a new topic under asctec-users, email [hidden email]
To unsubscribe from asctec-users, click here.




The NLR disclaimer is valid for NLR e-mail messages.