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

CatherineH's profile - activity

2021-06-18 10:36:23 -0500 received badge  Nice Question (source)
2020-10-23 13:24:04 -0500 received badge  Good Question (source)
2020-08-13 17:27:57 -0500 received badge  Good Question (source)
2020-04-02 11:56:48 -0500 received badge  Nice Answer (source)
2020-04-02 11:56:17 -0500 received badge  Nice Question (source)
2019-01-08 16:31:40 -0500 received badge  Great Answer (source)
2018-10-11 16:23:45 -0500 marked best answer How do you use inverseTimes()?

How do you use inverseTimes?

From reading the docs, it looks like it should be a member function of Transform(), and take another Transform() as the argument.

However, the following code:

from geometry_msgs.msg import Transform
my_tf1 = Transform()
my_tf2 = Transform()
my_tf1.translation.x = 2
my_tf2.translation.x = 5
my_tf1.inverseTimes(my_tf2)

produces the error:

AttributeError: 'Transform' object has no attribute 'inverseTimes'

Is there a different object in tf called Transform that I should be using instead?

2018-05-10 02:05:07 -0500 received badge  Good Answer (source)
2017-10-30 15:03:48 -0500 received badge  Nice Question (source)
2017-05-14 15:40:06 -0500 received badge  Nice Question (source)
2016-12-10 17:48:11 -0500 received badge  Enlightened (source)
2016-12-10 17:48:11 -0500 received badge  Good Answer (source)
2016-11-24 10:37:52 -0500 received badge  Famous Question (source)
2016-11-21 19:20:09 -0500 received badge  Nice Answer (source)
2016-06-16 19:02:21 -0500 received badge  Necromancer (source)
2016-04-13 22:21:33 -0500 received badge  Famous Question (source)
2016-03-16 18:06:57 -0500 received badge  Self-Learner (source)
2016-03-16 18:05:02 -0500 received badge  Student (source)
2016-03-14 11:21:13 -0500 received badge  Nice Answer (source)
2016-03-11 08:28:25 -0500 received badge  Notable Question (source)
2016-03-03 07:33:29 -0500 received badge  Famous Question (source)
2016-03-03 07:33:29 -0500 received badge  Notable Question (source)
2016-02-10 15:26:07 -0500 received badge  Famous Question (source)
2016-02-02 21:04:19 -0500 received badge  Notable Question (source)
2015-11-27 12:26:06 -0500 received badge  Famous Question (source)
2015-11-25 08:51:30 -0500 answered a question Triggering pip requirements.txt from catkin build

As William's answer states, rosdep is the way to go.

For example, I can replicate the call to pip by first creating a rosdep.yaml file in my directory with the contents:

pip-seaborn:
 ubuntu:
  pip:
    packages: [seaborn]
pip-vikit-py:
 ubuntu:
  pip:
    packages: [vikit-py]
    alt_install_cmd: git+git://github.com/CatherineH/rpg_vikit.git#egg=vikit_py&subdirectory=vikit_py

Then, I modify my package.xml file to include:

<run_depend>pip-seaborn</run_depend>
<run_depend>pip-vikit-py</run_depend>

Then, I created the file /etc/ros/rosdep/sources.list.d/40-my-list.list, which contains the line:

yaml file:///my-package-path/rosdep.yaml

Finally, I run:

rosdep update
rosdep install --from-path my-package-path
2015-11-25 08:20:06 -0500 received badge  Scholar (source)
2015-11-25 08:19:22 -0500 received badge  Notable Question (source)
2015-11-25 01:42:13 -0500 received badge  Popular Question (source)
2015-11-24 14:27:08 -0500 asked a question Triggering pip requirements.txt from catkin build

Is it possible to get catkin build to run pip install -r requirements.txt?

Some of the python package dependencies for my package are in version control systems, and because of this I think I need to use pip to install them instead of putting them in setup.py.

2015-11-17 09:17:39 -0500 received badge  Popular Question (source)
2015-11-17 08:24:43 -0500 commented question Calling rospy.init_node() twice in the same python process

I tried that, but ran into problems. From what I can tell, rosbag play on the command line works differently from the rosbag API.

2015-11-17 08:21:42 -0500 received badge  Editor (source)
2015-11-17 08:20:53 -0500 commented question Calling rospy.init_node() twice in the same python process

To clarify, by "shut down everything" I mean I kill the rosmaster process and all children at step 4. Hence, I need to call init_node again when the rosmaster and all of its children again, or my subscribers will not work.

2015-11-17 08:18:52 -0500 commented question Calling rospy.init_node() twice in the same python process

Yes, I want to play multiple bag files, one at a time, and ensure that there is no leftover information from a previous run that might taint the results.

2015-11-17 08:15:43 -0500 received badge  Notable Question (source)
2015-11-17 08:06:04 -0500 asked a question Calling rospy.init_node() twice in the same python process

I want to use python to batch process data with ROS. This is the process that I would like to follow:

For each file/set of variables, from the same python script:

  1. play the bag file as well as some external ros nodes
  2. call rospy.init_node, set up the subscribers
  3. do the processing
  4. shut down the rosmaster process and all child processes
  5. go back to step 1 with different variables or file name

However, the following results in the error:

ROSException: rospy.init_node() has already been called with different arguments:

These are the lines in the rospy specifically that are causing the problem:

 global _init_node_args

# #972: allow duplicate init_node args if calls are identical
# NOTE: we don't bother checking for node name aliases (e.g. 'foo' == '/foo').
if _init_node_args:
    if _init_node_args != (name, argv, anonymous, log_level, disable_rostime, disable_signals):
        raise rospy.exceptions.ROSException("rospy.init_node() has already been called with different arguments: "+str(_init_node_args))
    else:
        return #already initialized

The variable _init_node_args persists even though the main rosmaster has been killed. How can I reset this variable?

2015-10-07 15:54:58 -0500 received badge  Popular Question (source)
2015-09-02 15:09:18 -0500 received badge  Popular Question (source)
2015-09-02 13:06:07 -0500 commented answer Loading variables with xacro:include

"variables are global" - I don't think this is true for xacro files. For example, this does not send lidar=true to the description:

<xacro:arg name="lidar" value="true"/>
<xacro:include filename="robot_description.urdf.xacro" />
2015-09-02 12:20:53 -0500 asked a question Loading variables with xacro:include

In roslaunch, if I include a file, I can pass it arguments like this:

 <include file="$(find gazebo_ros)/launch/empty_world.launch">
    <arg name="world_name" value="worlds/empty.world" />
  </include>

Is there an equivalent for xacro:include? For example:

  <xacro:include filename="robot_description.urdf.xacro">
     <xacro:arg name="lidar" value="true"/>
  </xacro:include>

I know I can do this using something like:

<param name="robot_description" command="$(find xacro)/xacro.py robot_description.urdf.xacro lidar:=true" />

However, this is not an ideal solution, as I would like to nest my robot_description urdf in a larger definition of robot_description.

2015-08-05 17:21:46 -0500 received badge  Supporter (source)
2015-08-04 15:27:06 -0500 received badge  Popular Question (source)