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

baxelrod's profile - activity

2023-04-26 02:28:47 -0500 marked best answer Is there a way to invalidate a Pose in rviz?

I often publish a Pose message to quickly and easily view things in rviz. And I would like a way to programatically (through a message) tell rviz to delete the pose from view.

The scenario is that I have a robot which grabs objects on a table. And I want to display the pose of the object in rviz. I do several runs with different objects and positions. So between runs I would like to clear the previous runs from view. This is easy to do with rviz markers, but not with regular Pose messages.

I have tried publishing with a 0 time stamp and empty frame_id with no luck in deleting the frame. I have observed tf frames becoming gray and disappearing, how is that done?

Can a new marker type be added to display axes?

2023-04-26 02:27:14 -0500 received badge  Nice Question (source)
2017-10-06 03:12:40 -0500 received badge  Nice Question (source)
2016-06-24 10:11:44 -0500 received badge  Famous Question (source)
2016-03-13 17:57:47 -0500 received badge  Great Question (source)
2015-09-27 03:07:23 -0500 received badge  Great Answer (source)
2015-04-23 03:21:48 -0500 marked best answer How to use resource_retriever urls in command line yaml in launch script

I am trying to display a mesh file in rviz by publishing a latched Marker message with "rostopic pub". This works, however, when I move this into a launch script, i get errors regarding the resource_retriever url. the launch script line:

<node name="$(anon robot_mesh_pub)" pkg="rostopic" type="rostopic" args="pub -l /robot_mesh visualization_msgs/Marker '{header: {frame_id: '/robot'}, type: 10, pose: {position: {x: 0, y: 0, z: 0.2}, orientation: {x: 0.5, y: 0.5, z: 0.5, w: 0.5}}, scale: {x: 0.001, y: 0.001, z: 0.001}, color: {r: 1.0, g: 1.0, b: 1.0, a: 1.0}, frame_locked: true, mesh_resource: package://meshes/robot.stl}'" output="screen"/>

I have tried to quote, and escape quote the "package://meshes/robot.stl" string in many different ways with no success. I think the problem is that the resource_retriever protocol "package:" looks just like the yaml dictionary key. (a string followed by a colon). and the roslaunch parser won't let me escape the quotes properly.

3 ideas:

  1. use the list format for command line yaml instead of dictionaries. (painful)

  2. the resource_retriever should have a feature to also accept "regular" file paths that start with a slash.

  3. this is possibly a bug in the roslaunch parser because it doesn't seem to handle escaped quotes properly.

2015-01-20 08:57:04 -0500 received badge  Notable Question (source)
2014-12-16 10:59:11 -0500 received badge  Popular Question (source)
2014-12-16 09:14:03 -0500 asked a question roslaunch order of rosparams

What is the order that roslaunch parses and loads parameters? I understand that roslaunch doesn't guarantee the order of nodes launched, but are there some guarantees for parameters, specifically related to nodes? Example launch file:

<launch>
  <param name="p1" value="p1" />
  <node pkg="test_node" type="test_node" name="test_node" >
    <param name="p2" value="p2" />
    <rosparam command="load" file="test.yaml" />
    <param name="p3" value="p3" />
  </node>
  <param name="p4" value="p4" />
</launch>

Some specific questions:

  • Are all parameters in the file (and possibly all included launch files) loaded before all the nodes? For example: p1, and p4 loaded before test_node.
  • Are parameters in a node's namespace guaranteed to be loaded before the node is launched? For example: p2, test.yaml and p3 loaded before test_node.
  • If there are multiple parameters with the same name, which one will overwrite the other? For example, if p4 had the same name as p1, which one wins?
  • If a parameter has the same name as one in a yaml file, which will overwrite the other? For example, if p2 or p3 had the same name as a parameter in test.yaml, which one wins?
2014-08-03 11:12:19 -0500 marked best answer Is there a rosmake clean?

I know about rosmake --pre-clean. But what if you just want to clean your package and not build it? There doesn't seem to be a "don't build" flag in rosmake.

When I have a new package that I want to add to my svn repository, I develop it until it is working, then remove the bin, build, and other computer generated files, then do an svn add on the package. I typically remove all these directories by hand...

2014-06-24 08:31:39 -0500 received badge  Famous Question (source)
2014-06-16 09:45:29 -0500 received badge  Famous Question (source)
2014-06-16 09:45:29 -0500 received badge  Notable Question (source)
2014-05-24 07:31:32 -0500 marked best answer rosnode zombies

Sometimes when a node crashes, or I kill it, it still shows up in rosnode list. I don't seem to be able to find the process using ps. And the node does not go away in the list when i do a rosnode kill <node>. I have seen this with both 'regular' nodes as well as ros tools such as rostopic.

The only thing that seems to work is to kill and restart the roscore.

This is not a major issue for me, I was just wondering what was going on here.

2014-05-01 18:20:08 -0500 received badge  Notable Question (source)
2014-04-20 14:21:46 -0500 marked best answer Order of catkin source setup.bash files matters?

I have these lines in my .bashrc file:

source /opt/ros/hydro/setup.bash
source /home/baxelrod/my_catkin_ws/devel/setup.bash
source /home/baxelrod/my_other_catkin_ws/devel/setup.bash

Which yields this environment variable:

ROS_PACKAGE_PATH=/home/baxelrod/my_other_catkin_ws/src:
                 /home/baxelrod/my_catkin_ws/src:
                 /opt/ros/hydro/share:
                 /opt/ros/hydro/stacks

However, when I change the order of "source" lines in my .bashrc to have "my_other_catkin_ws" before "my_catkin_ws", close and open a new terminal, then the ROS_PACKAGE_PATH becomes:

ROS_PACKAGE_PATH=/home/baxelrod/my_catkin_ws/src:
                 /opt/ros/hydro/share:
                 /opt/ros/hydro/stacks

What gives?

More info:

  • I am using ROS Hydro on Ubuntu 12.04.
  • Both catkin workspaces are compiled.
  • The workspaces were created at different times. my_catkin_ws is significantly newer than my_other_catkin_ws. (I updated my ROS packages a few times in between.) This is strange because it seems like sourcing my_catkin_ws (the newer workspace) clobbers the existing path. So it seems like maybe a bug was introduced.
  • I diffed both setup.bash and setup.sh files and there are no differences besides the path to the workspace
2014-04-20 13:08:50 -0500 marked best answer interactive markers and point cloud catch 22 in rviz

I seem to have a catch 22 situation using interactive markers and point clouds in rviz. What i am trying to do is manually align multiple planar laser scans with interactive markers. (I know that there is a scan matching package, but there is very little overlap between my lasers, and i was just trying to do something quick and dirty). the laser scans have been converted to PointCloud2 types. My interactive marker node simply takes the marker position and broadcasts this pose to tf. I am using Fuerte on Ubuntu 12.04, with roscore on an external machine.

  1. my interactive markers don't seem to work unless i start rviz before launching my (python) interactive marker node.

  2. my pointclouds don't seem to display in rviz unless they are publishing before rviz starts.

  3. starting my lasers, then rviz, then the interactive markers doesn't work because rviz can't find the tf frames for the laser scans. (This restriction isn't an issue when the rosmaster is local).

Is there any workaround for this? Perhaps a way to get rviz to refresh or reload tf info when using an external master? or is there a way to publish a long lasting tf frame before my laser nodes start, then i can override this frame with the interactive markers later?

2014-04-20 12:35:27 -0500 marked best answer calibration of a custom robot with a Swissranger

I am interested in using the pr2_calibration package to calibrate a custom robot. My robot has a 7 DOF arm, 4 DOF neck, 3 cameras, and a Swiss Ranger flash LIDAR. I am wondering what is the best way to model the Swiss Ranger for the pr2_calibration package. It doesn't really fit the existing tilting laser or camera models. Although, i could probably go in either direction. Has anyone done this before?

2014-04-20 12:27:57 -0500 marked best answer tf re-boadcaster

I would like a way to publish tf transforms, but using a standard ros::Publisher instead of the tf::TransformBroadcaster. (I won't go into the reasons why).

The only way I think this can be done is to publish stamped transforms on a designated topic, then having a second node which subscribes to this topic and simply re-publishes them with the transform broadcaster.

Any other ideas? Is there a standard node that does this already? (I know about the robot_state_publisher which almost fits my needs).

2014-04-20 12:23:59 -0500 marked best answer What does "struct integer overflow" DeprecationWarning mean?

I am getting a lot of these errors:

    /opt/ros/cturtle/ros/core/rospy/src/rospy/msg.py:151: DeprecationWarning: struct integer overflow masking is deprecated
      msg.serialize(b)

Does anyone know what this is about? I have not been able to track down the specific messages in my system that cause it. I am running with CTurtle on Ubuntu 10.04.

2014-04-20 12:22:34 -0500 marked best answer Roslaunch recursive parsing

Does anyone have some code or utility that will let me use 'cat' or 'grep' recursively on ros launch files? I have launch files that include other launch files, and it can be quite a hunt to find things sometimes.

2014-04-20 12:22:15 -0500 marked best answer Change rospy node log level while running

Is there any way to change a rospy node's log level while it is running? http://www.ros.org/wiki/rospy/Overview/Logging says that you must pass in a parameter to rospy.init_node(), which means you need to kill and restart the node...

Also, I am curious why rxloggerlevel doesn't work for python nodes.

2014-04-20 12:22:07 -0500 marked best answer Clarification on ROS's port usage

According to this page: http://www.ros.org/wiki/ROS/NetworkSetup, for nodes on two computers to communicate, all ports must be open.

  1. Doesn't this raise security concerns?
  2. Is it really all ports? Isn't it only ports above 1024 or perhaps a smaller subset?
2014-04-20 12:22:03 -0500 marked best answer Test for when a rospy publisher become available

I noticed that you must sleep for some amount of time before a rospy publisher actually starts to work. I was wondering if there is any way to test for this?

pub = rospy.Publisher('foo', bar)
pub.publish(bar('a'))    # does not publish
rospy.sleep(1)
pub.publish(bar('b'))    # actually does publish

Will publisher.get_num_connections() do this?

pub = rospy.Publisher('foo', bar)
print pub.get_num_connections() # prints 0
rospy.sleep(1)
print pub.get_num_connections() # prints 1

In my case it goes from 0 to 1, but will this simply increment by 1 in the general case? And if so, what if this node is started with several other nodes in a launch script? Is this safe to do and will it give me the guarantee I am looking for?

pub = rospy.Publisher('foo', bar)
num = pub.get_num_connections()
while not rospy.is_shutdown() and pub.get_num_connections() == num:
    pass
pub.publish(bar())