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

phil0stine's profile - activity

2023-06-28 00:26:00 -0500 received badge  Good Answer (source)
2023-01-23 04:35:36 -0500 received badge  Nice Answer (source)
2020-11-16 11:20:38 -0500 received badge  Necromancer (source)
2020-11-16 07:53:44 -0500 answered a question Error in robot control (gazebo) - load_parameters: unable to set parameters (last param was [/bl_wheel_trans_controller/pid/i=1.0]): cannot marshal None unless allow_none is enabled

There is an indentation problem with your config.yaml. If you use some kind of online yaml interpreter you will see the

2020-08-24 07:54:54 -0500 received badge  Guru (source)
2020-08-24 07:54:54 -0500 received badge  Great Answer (source)
2017-02-06 04:01:19 -0500 received badge  Enlightened (source)
2017-02-06 04:01:19 -0500 received badge  Good Answer (source)
2015-07-22 20:59:08 -0500 received badge  Good Question (source)
2014-04-20 06:47:42 -0500 marked best answer how can I modify the value of a transform when playing back a bag file?

Just like there are message filters, would it be possible to make tf filters?

I often find I want to modify the value of a single node in the tf tree when I have a bagfile, or to eliminate broadcasts on tf altogether.

It also could be useful to associate/utilize multiple tf's together, even when broadcast at different rates. Like ApproximateTime can do with messages

2014-02-06 23:12:43 -0500 received badge  Famous Question (source)
2014-01-28 17:29:01 -0500 marked best answer rosserial_client multiple publishers

I have a custom implementation for an Atmega1284p using pololu-avr libraries, and get an odd error when trying to publish more than one topic from the controller. With only a single topic, the program runs fine, even with more complex custom messages.

This modified HelloWorld example simply tries to populate 2 string messages, the corresponding Hardware templated definition is also given below. The resulting error is

[INFO] [WallTime: 1358904787.097966] Setup Publisher on yell [std_msgs/String]
[ERROR] [WallTime: 1358904787.321421] Tried to publish before configured, topic id 125

Is anybody able to re-create this using either this particular library or any other custom hardware? Thanks

HelloWorld.cpp

#include "ros.h"
#include "std_msgs/String.h"

// Include C headers (ie, non C++ headers) in this block
extern "C"
{
  #include <util/delay.h>
}

// Needed for AVR to use virtual functions
extern "C" void __cxa_pure_virtual(void);
void __cxa_pure_virtual(void) {}

ros::NodeHandle nh;

std_msgs::String str_msg;
std_msgs::String str_yell_msg;
ros::Publisher chatter("chatter", &str_msg);
ros::Publisher yell("yell", &str_yell_msg);

char hello[13] = "hello world!";

char hello_yell[13] = "HELLO WORLD!";

int main()
{
  uint32_t lasttime = 0UL;

  // Initialize ROS
  nh.initNode();
  nh.advertise(chatter);
  nh.advertise(yell);

  while(1)
  {
    OrangutanSerial::check();
    // Send the message every second
    if(OrangutanTime::ms() - lasttime > 1000)
    {
      str_msg.data = hello;
      chatter.publish(&str_msg);
      str_yell_msg.data = hello_yell;
      chatter.publish(&str_yell_msg);
      lasttime = OrangutanTime::ms();
    }
    nh.spinOnce();
  }

  return 0;
}

svp1284Hardware.h (templated in ros.h)

#ifndef _SVP1284_HARDWARE_H
#define _SVP1284_HARDWARE_H

extern "C"
{
  #include <pololu/orangutan.h>
}

#define port USB_COMM

class svp1284Hardware {
  public:
    svp1284Hardware(): receive_buffer_position_(0) {}

    // Initialize the AVR
    void init()
    {
      OrangutanTime::ms();// If not already called, this will call private function init()
      OrangutanSerial::receiveRing(port, receive_buffer_, sizeof(receive_buffer_));
    }

    // Read a byte of data from ROS connection.
    // If no data, returns -1
    int read()
    {
      OrangutanSerial::check();
      if (OrangutanSerial::getReceivedBytes(port)!= receive_buffer_position_)
      {
        b=(unsigned char)receive_buffer_[receive_buffer_position_];
        increment_buffer_pos();
        return b;
      }
      else
      {
          return -1;
      }
    }

    // Send bytes of data to ROS connection
    void write(uint8_t* data, int length)
    {
      OrangutanSerial::send(port,(char*) data,length);
    }


    // Returns milliseconds since start of program
    unsigned long time()
    {
      return OrangutanTime::ms();
    }

  private:
    char receive_buffer_[128];
    unsigned char receive_buffer_position_;
    unsigned char b;

    void increment_buffer_pos()
    {
      // Increment receive_buffer_position, but wrap around when it gets to
      // the end of the buffer.
      if (receive_buffer_position_ == sizeof(receive_buffer_)-1)
      {
        receive_buffer_position_ = 0;
      }
      else
      {
        receive_buffer_position_++;
      }
    }

  };

#endif
2014-01-28 17:27:02 -0500 marked best answer Gazebo with controller

I know there have been a few posts on SDF vs URDF for gazebo, but I'm still not sure I know which to use.

It particularly interests me when I see this in the terminal (running pr2_empty_world.launch ):

Warning [parser.cc:348] Gazebo SDF has no gazebo element
Warning [parser.cc:291] DEPRECATED GAZEBO MODEL FILE
On July 1st, 2012, this formate will no longer by supported
Convert your files using the gzsdf command line tool
You have been warned!

So, if I want to go to SDF, then I cannot run a robot controller, or at least cannot use robot_description param required to run a controller.

But if I stick with URDF, then it's deprecated? If I could input Collada files or SDF with the robot_description param, I think it would help.

I see the reference to a collada converter here but haven't seen anything on it since this ticket that's over a year old.

Has it been maintained?

2014-01-28 17:25:45 -0500 marked best answer smach sub State Machine userdata

A related, simpler version of a previous post here

Say I have a Top level Concurrence container, running

1) A ros topic monitor State

2) A sub State Machine, with its own states.

Can I pass updates received on the topic monitor to the sub SM states?

Thanks

2014-01-28 17:25:24 -0500 marked best answer tf exception map to base_link

Hi all

We have a robot with 2 machines (1 quad core, 1 dual, both SSD) that makes heavy use of tf.

With everything running, we have about 80 nodes/nodelets. The machines are certainly being taxed, but we have found that recently tf lookups are simply not working. Here's a typical exception, though it's not the only type we've seen:

Caught Transform Exception: Unable to lookup transform, cache is empty, when looking up transform from frame [/base_link] to frame [/map]

I am particularly confused about how the cache could be empty, unless the machine is hung so badly that absolutely no /tf data is being received.

Also, if we are logged in remotely to a machine and call rosrun tf tf_echo /map /base_link, the echo works as expected.

In this particular example, I am calling the tf lookup as follows:

  try{
    ros::spinOnce();
    tf::StampedTransform fixed_to_base;
    listener_.waitForTransform(fixed_frame_,base_frame_,msg->header.stamp,ros::Duration(30.0));
    listener_.lookupTransform(fixed_frame_,base_frame_,msg->header.stamp,fixed_to_base);

This is happening with calls in multiple processes, both C++ and python, so is there anything we should be doing differently?

2014-01-28 17:23:28 -0500 marked best answer Eigen Conversion invalid matrix template parameters

I am trying to run the Darpa Arm Robot in electric, has anybody else tried this?

The install instructions are given only for cturtle, but from a bit more reading I believed that the incompatibility with diamondback and electric had to do with converting from eigen2->eigen3.

After a few code changes, I have got all but one package to build, BarrettCompat.

Has anybody else run into this sort of error?

In file included from /usr/include/eigen3/Eigen/Core:299:0,
                 from /home/phil/devel/arm_simulator/stacks/darpa_arm_sim_servers/BarrettCompat/include/barrett/systems/../systems/../math/matrix.h:22,
                 from /home/phil/devel/arm_simulator/stacks/darpa_arm_sim_servers/BarrettCompat/include/barrett/systems/../systems/../units.h:123,
                 from /home/phil/devel/arm_simulator/stacks/darpa_arm_sim_servers/BarrettCompat/include/barrett/systems/../systems/wam_specs.h:4,
                 from /home/phil/devel/arm_simulator/stacks/darpa_arm_sim_servers/BarrettCompat/include/barrett/systems/exposed_output.h:39,
                 from /home/phil/devel/arm_simulator/stacks/darpa_arm_sim_servers/BarrettCompat/src/barrett/ExposedOutput-specializations.cpp:1:
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h: In static member function ‘static void Eigen::PlainObjectBase<Derived>::_check_template_params() [with Derived = Eigen::Matrix<double, 7, 1, 1, 7, 1>]’:
/usr/include/eigen3/Eigen/src/Core/Matrix.h:304:7:   instantiated from ‘Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>::Matrix(const Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols>&) [with _Scalar = double, int _Rows = 7, int _Cols = 1, int _Options = 1, int _MaxRows = 7, int _MaxCols = 1, Eigen::Matrix<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> = Eigen::Matrix<double, 7, 1, 1, 7, 1>]’
make[3]: Leaving directory `/home/phil/devel/arm_simulator/stacks/darpa_arm_sim_servers/BarrettCompat/build'
/home/phil/devel/arm_simulator/stacks/darpa_arm_sim_servers/BarrettCompat/include/barrett/systems/../systems/../math/detail/matrix-inl.h:145:23:   instantiated from ‘barrett::math::Matrix<R, C, Units>::Matrix(const barrett::math::Matrix<R, C, Units>&) [with int R = 7, int C = 1, Units = barrett::units::JointPositions<7>, barrett::math::Matrix<R, C, Units> = barrett::math::Matrix<7, 1, barrett::units::JointPositions<7> >]’
make[2]: Leaving directory `/home/phil/devel/arm_simulator/stacks/darpa_arm_sim_servers/BarrettCompat/build'
/home/phil/devel/arm_simulator/stacks/darpa_arm_sim_servers/BarrettCompat/src/barrett/ExposedOutput-specializations.cpp:12:53:   instantiated from here
make[1]: Leaving directory `/home/phil/devel/arm_simulator/stacks/darpa_arm_sim_servers/BarrettCompat/build'
/usr/include/eigen3/Eigen/src/Core/PlainObjectBase.h:615:7: error: ‘INVALID_MATRIX_TEMPLATE_PARAMETERS’ is not a member of ‘Eigen::internal::static_assertion<false>’
2014-01-28 17:22:41 -0500 marked best answer scripting rviz

I do not know what command line params there are for rviz, but being able to script consecutive runs and record the results would be quite nice (and not so repetitive!). Some examples of things I would like the script to control:

the tf cache buffer size.

the location and orientation of the orbiting camera.

Thoughts? I realize there are a great many rviz params that one might want to control, and it might be cumbersome to code. Thanks

2014-01-28 17:22:26 -0500 marked best answer bag a kinect for more than 30 seconds

When I use openni_camera to broadcast and then bag the kinect, at ~ 30 seconds the recording chokes for seconds, and large gaps are present in rxbag inspection.

I am running Ubuntu 10.04 with 16G of RAM and a quad core. This behavior was also seen on a machine running 10.10, with SSD hard drive, an i7 processor, and 16G RAM.

Have others experienced this phenomenon? I am wondering if it isn't a Linux issue...

2014-01-28 17:22:20 -0500 marked best answer how to access old transforms tf

Let's say I have an algorithm that takes timestamped data and processes it, with the processing taking > 10 seconds. Not exactly blazing fast, I know, but for arguments sake let's say the code is well written and optimized :)

If the tf buffer is only set to 10 seconds, then publishing or listening to tf with the original timestamp will fail.

Is there a way to control the size of the tf buffer, or is tf not the tool for applying transforms in this case?

Has anybody else ran into this issue? I would not be surprised if this came up for the UCB clothes folding app.

2014-01-28 17:22:17 -0500 marked best answer waitForTransform use_sim_time python

This is basically the same question as was asked here, but I am seeing the exact same behavior and haven't found a solution.

I am playing back a bag, using --clock, and setting use_sim_time correctly.

To summarize the problem, this works :

listener.waitForTransform('frame1','frame2',rospy.Time(),rospy.Duration(.1))
listener.lookupTransform('frame1','frame2',rospy.Time())

but this doesn't :

listener.waitForTransform('frame1','frame2',rospy.Time(),rospy.Duration(.1))
time_stamp=listener.getLatestCommonTime('frame1','frame2') # This does return the sim time
listener.lookupTransform('frame1','frame2',time_stamp)

nor does this :

listener.waitForTransform('frame1','frame2',time_stamp,rospy.Duration(100.0)) 
listener.lookupTransform('frame1','frame2',time_stamp)

The error returned is :

You requested a transform that is 278350010.097 miliseconds in the past, but the most recent transform in the tf buffer is 278350024.236 miliseconds old.

The most recent transform seems to always be a very small time ahead of the requested transform.

Do I need to migrate this node to C++, or am I doing something wrong?

Thanks in advace

-Phil Osteen, Motile Robotics Inc.