ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

micheal's profile - activity

2017-03-03 18:30:33 -0500 received badge  Good Question (source)
2014-07-15 19:43:31 -0500 received badge  Famous Question (source)
2014-07-15 19:43:31 -0500 received badge  Notable Question (source)
2014-01-28 17:31:37 -0500 marked best answer Why is ROS ANSWERS forum so easily exploitable?

ROS ANSWERS unlike stackexchange, ubuntu forums is easily exploitable and I want to divert the attention of forum moderators to this issue. In this forum anybody can make an account and upvote answers or ask any questions. You do not need certain amount of karma to upvote questions so I can make as many accounts as I want. Also one does not need email verification to set up an account for this forum. I can use this forum on someone else's email account and will encounter no problems or restrictions. I just care about this community so wanted to share my opinion. I hope the moderators understand although I do realize that this does not have many disadvantages but still.

2014-01-28 17:31:32 -0500 marked best answer How to represent a 'char' in rosmsg files

I have to represent character(unsigned char) in ros msg files. As mentioned in the wiki, they have primitive types for string, integer, floats but not for the character.

However the wiki does say that char: deprecated alias for uint8 . I do not know what does that mean.

How can I represent something like unsigned char code[N]; from C++ where N=2; into msg format. Would it be uint8[] code. Where do I put in the '2' or I dont have to put it and msg fomat finds out the length of array itself.

Here is the link to wiki for ros msg

2014-01-28 17:31:28 -0500 marked best answer Small Confusion about TF

if I have a broadcaster like this:

void pub_odom::odom_callback(const nav_msgs::Odometry& odom) {

btVector3 Position;
btQuaternion Orientation;
tf::TransformBroadcaster odom_broadcaster_;
tf::StampedTransform odom_transform;

Position.setValue(odom.pose.pose.position.x,odom.pose.pose.position.y,odom.pose.pose.position.z);
Orientation.setW(odom.pose.pose.orientation.w);
Orientation.setX(odom.pose.pose.orientation.x);
Orientation.setY(odom.pose.pose.orientation.y);
Orientation.setZ(odom.pose.pose.orientation.z);

odom_transform.setOrigin(map_center);
odom_transform.setRotation(tf::Quaternion(tf::Vector3(0,0,1),-yaw_init));
odom_transform.stamp_ = odom.header.stamp;
odom_transform.child_frame_id_= "/odom";
odom_transform.frame_id_= "/center_map";
odom_broadcaster_.sendTransform(odom_transform);}

How do I visualise its publication on rviz and tf. Do i have to create something like in my launch file in order to visualise it:

<node pkg="tf" type="static_transform_publisher" name="tf_data" args="1.0 0.0 0.0 0.0 1.0 0.0 /odom /another_link 20" />

WHen I do it with this launch file I can visualise in tf the tranformation between /odom and /another_link and the transformation is based on args I have given in launch file. How do I get the publication based on the broadcaster and the callback function.

2014-01-28 17:31:28 -0500 marked best answer How to create a node that listens to particular topic and publishes tf

How can I create a node that listens to that particular topic and publishes the required required tf. I have succesfully published data on a topic. Now I want to exhibit it in TF. Do I need a TF broadcaster, something like this

tf::TransformBroadcaster br;
tf::Transform transform;
transform.setOrigin( tf::Vector3(0,0,0)); 
transform.setRotation( tf::Quaternion(x,y,z,w) ); 
br.sendTransform(tf::StampedTransform(transform, ros::Time::now(), "optical", "base_link"));

Even If I have something like this. How do I listen and display it. Forexample do I need a tf listener to listen to some topic which is publishing data. If thats the case. What would the code look like if my topic is /mytopic

2014-01-28 17:31:26 -0500 marked best answer Any ROS tutorial which uses custom made msgs to publish data over topic

I have found a lot of tutorials in which messages files which are already provided by ROS are used to publish data over a topic. However I am planning on making my own custom messages to publish over ROS. Is there any tutorials which helps in that.

2013-11-28 02:02:26 -0500 received badge  Famous Question (source)
2013-11-14 11:22:09 -0500 received badge  Famous Question (source)
2013-11-09 06:24:59 -0500 received badge  Famous Question (source)
2013-10-01 06:50:51 -0500 received badge  Notable Question (source)
2013-09-22 23:49:46 -0500 received badge  Famous Question (source)
2013-08-24 15:19:50 -0500 received badge  Notable Question (source)
2013-08-20 02:48:47 -0500 received badge  Popular Question (source)
2013-08-19 05:06:12 -0500 received badge  Popular Question (source)
2013-08-19 04:45:54 -0500 received badge  Popular Question (source)
2013-08-19 04:18:24 -0500 marked best answer Using Makers Array in rviz

For my laboratory project, I have to use markers arrays in rviz to show the movement of satellites around the globe. The parameters of satellites are changing constantly. I have to represent every satellite in spherical coordinates for 3D movement. I have successfully been able to publish all the 3 parameters of every satellite on a topic "menutopic". Now I do not know how can I represent the satellites as markers array in rviz with constantly changing parameters.

2013-08-19 02:36:07 -0500 received badge  Nice Question (source)
2013-08-19 00:06:38 -0500 edited answer Using Makers Array in rviz

This answer was provided by Martin Günther and everything provided below is completely his work.

There's a good tutorial on Markers on the ros.org wiki; make sure to go through that first.

Some things to watch out for in general (otherwise the markers won't be displayed):

set the alpha value (marker.color.a) to something non-zero you have to specify a valid quaternion as orientation (e.g., marker.pose.orientation.w = 1.0) Some more specific answers to your question:

You need to convert the spherical coordinates into a geometry_msgs/PoseStamped, and put that into marker.pose. You can either publish each marker in an individual message and publish them on some topic of type visualization_msgs/Marker, or put several of them into a MarkerArray and publish them on a topic of type visualization_msgs/MarkerArray. The latter is more efficient than the former, but for your use case either should work. Constantly updating the position of each sattelite works like this: You set the namespace of all markers to the same namespace (e.g., marker.ns = "sattelites"), and give each sattelite a unique id (e.g., marker.id = 23). Whenever you want to update the pose of a marker, just publish another Marker message with the same id (it will overwrite the previous one). Even if nothing changes, you should re-publish all existing markers regularly.

In order to add text/name to a marker in rviz. Just add a second marker of type TEXT_VIEW_FACING and fill out the text property.

2013-08-19 00:05:09 -0500 asked a question How can I represent Multidimensional array in msg format

If i have something like

int  mein[NUM][4];

in C++. How do I represent it in msg format. Should it be something like

uint8[][4] mein

Also as NUM is defined in my C++ file and can vary according to certain parameters. Should I just allocate it dynamically in msg format or I should give it a certain value or define NUM in msg format. Do you think there would be any disadvantage if I just allocate it dynamically meaning like uint8[][4] mein.