Xtion Compiling Problems

8 replies [Last post]
amehta
Title: NooBot
Joined: 07/18/2011
Posts:
BotPoints: 136
User offline. Last seen 5 years 32 weeks ago.

Hi, I was trying out scanlines but my KISS IDE doesn't seem to like to compile them. When I try this code:

depth_open();
while (b_button()==0)
{
     depth_update();
     get_depth_scanline_update(50);
     printf("%d\n", get_scanline_object_count(50));
     msleep(100);
}
depth_close();

It won't compile. I tried changing the target from My Computer to Similator to the actual LINK itself, and none of them worked. Here are the errors I got:

Link: http://imgur.com/h9FHz63
Simulator/Computer: http://imgur.com/SeXNoV1

From what I understand it's thinking I'm using functions that weren't previously defined (as if I used something like qwerty()), but I know those functions exist because they're in the library and the documentation.

Anyone have any ideas?

n/a
mklein
Title: NooBot
Joined: 01/15/2014
Posts:
BotPoints: 14
User offline. Last seen 6 years 50 weeks ago.

Hi,

have you maybe forgot to update your Link?
If not, try to add #include at the beginning of you file.

--Markus

Marty Rand
Marty Rand's picture
Title: Botball Youth Advisory Council
Joined: 07/04/2009
Posts:
BotPoints: 253
User offline. Last seen 8 years 6 weeks ago.

I'm not sure, but I don't think get_scanline_object_count() has any arguments. I believe it uses the line you used in get_depth_scanline_update(50);

Try removing the argument from get_scanline_object_count()

-Marty Rand
{
Senior programmer at Norman Advanced Robotics

Former senior programmer at Whittier Middle School

Youth Advisory Council

All around nerd
}

YuSheng.Chen
Title: NooBot
Joined: 10/28/2013
Posts:
BotPoints: 286
User offline. Last seen 8 years 33 weeks ago.

Also, make sure you have KISS IDE 5.1.2

amehta
Title: NooBot
Joined: 07/18/2011
Posts:
BotPoints: 136
User offline. Last seen 5 years 32 weeks ago.

Thanks everyone for your responses, but:

1. I have the newest update
2. It does have arguments, according to the documentation, at least. It needs a row. Also it's both of the arguments, I tried isolating each one and they both had errors.
3. I have the current software

-amehta (Andrew Mehta)

nzaman
Title: Software Engineer @ KIPR
Joined: 02/12/2014
Posts:
BotPoints: 12
User offline. Last seen 8 years 24 weeks ago.

The correct functions are:

int depth_scanline_update(int row);
int get_depth_scanline_object_count();

It looks like this is incorrect in the "KIPR/KISS Documentation" - thanks for pointing that out. Everything should be correct in "libkovan Documentation"

Nafis Zaman

amehta
Title: NooBot
Joined: 07/18/2011
Posts:
BotPoints: 136
User offline. Last seen 5 years 32 weeks ago.

Thanks, you guys should probably fix that.

-amehta (Andrew Mehta)

Jeremy Rand
Jeremy Rand's picture
Title: Botball Youth Advisory Council
Joined: 04/03/2009
Posts:
BotPoints: 1168
User offline. Last seen 7 years 18 weeks ago.

As a general rule, the libkovan source code on GitHub is preferable to checking KIPR's documentation, because in my experience KIPR sometimes forgets to update documentation. Of course, this advice only works for users who can read the libkovan source... but I think Andrew is sufficiently good at programming to do that.

-Jeremy Rand
Senior Programmer, Team SNARC (2012-2013), Norman Advanced (2010-2011), Norman HS (2008-2009), Norman North (2005-2007), Whittier MS (2003-2004)
2012-2013 VP of Tech, 2011 President, Botball YAC (2009-2013)
Mentor, Alcott and Whittier MS

nzaman
Title: Software Engineer @ KIPR
Joined: 02/12/2014
Posts:
BotPoints: 12
User offline. Last seen 8 years 24 weeks ago.

You don't even have to look through the libkovan source code. KISS Platform comes with full documentation of libkovan, accessible through "Help -> Documentation -> libkovan Documentation." This is updated every time libkovan is built, so outdated info is not a concern.

Nafis Zaman