Robotics StackExchange | Archived questions

Where is the member function to access message variables?

Hello all.

I'm new to ROS and ROSJAVA so I really really need your help to learn about this. The question looks idiot, but I have trouble with this for several days.

There are many message type such as stdmsgs, sensormsgs and so on. I usually work on ROSJAVA. And when I use strange msg type, I wonder where I can find function to access variables in the message. For example, recently I tried to use LaserScan.msg type and by looking at the LaserScan.msg file I noticed that there are many variables in it such as anglemin, ranges, intensities... Fortunately many other people have used this type of message so there are many information about how to use this. Likes, float[] ranges = _scan.getRanges(), float maxRange = Float.MINVALUE, _scan.getRangeMax() and so on.

But I want to know where I can find such function getRanges(), MIN_VALUE, getRangeMax().

Can anyone help me finding this? As a novice to this area, I really need your help.

Thank you!!

Asked by newbie on 2014-05-12 06:51:08 UTC

Comments

Answers