[ros-users] Mutil-dimension-array

Top Page
Attachments:
Message as email
+ (text/plain)
+ (text/html)
+ (text/plain)
+ (text/plain)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: ros-users
Subject: [ros-users] Mutil-dimension-array
Hi all,

When I tried to create a 2-dim array with ROS's srv, I had
some troubles with the server side.

from file "srv/Joints.srv":
float32[] joints

from file "srv/ImportPC.srv":
float32[] jts
---
Joints[] trajectory

In server.cpp, I tried to push_back a new Joints to trajectory like this:
res.trajectory[0].joints.push_back(sum);

It compiles, but of course at runtime it fails because trajectory[0] doesn't
exist.

So I tried something like this:
import_pc::Joints_<std::allocator<void> Jts ();
Jts.joints.push_back(sum);
res.trajectory.push_back(Jts);

However the template for import_pc::Joints_ is not correct. Any suggestion
would be really appreciated.

Thank you so much,
Paul
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl_______________________________________________
ros-users mailing list

https://lists.sourceforge.net/lists/listinfo/ros-users