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

conor.mcmahon's profile - activity

2021-12-18 18:43:57 -0500 received badge  Great Question (source)
2019-03-18 09:27:45 -0500 received badge  Good Question (source)
2018-08-08 15:41:46 -0500 received badge  Nice Question (source)
2018-04-04 04:32:21 -0500 received badge  Famous Question (source)
2018-04-01 04:57:51 -0500 received badge  Student (source)
2017-07-27 10:22:40 -0500 received badge  Notable Question (source)
2017-07-18 14:11:14 -0500 received badge  Enthusiast
2017-07-17 07:11:53 -0500 received badge  Notable Question (source)
2017-07-17 07:11:53 -0500 received badge  Famous Question (source)
2017-07-17 07:11:53 -0500 received badge  Popular Question (source)
2017-07-14 15:07:49 -0500 received badge  Popular Question (source)
2017-07-14 15:07:05 -0500 answered a question Quaternion to Rotate Rigid Frame

I'm just going to add an answer here saying that I've accepted for now the clunky solution I originally posited in my qu

2017-07-14 14:47:43 -0500 commented answer Quaternion to Rotate Rigid Frame

Hmm, ok, thanks! I'll definitely look into this at some point because I haven't used dyads before. My implementation ab

2017-07-14 14:47:17 -0500 commented answer Quaternion to Rotate Rigid Frame

Hmm, ok, thanks! I'll definitely look into this at some point because I haven't used dyads before. My implementation ab

2017-07-14 10:40:46 -0500 edited question Quaternion to Rotate Rigid Frame

Quaternion to Rotate Rigid Frame I have arbitrary planes defined by coefficients A,B,C,D such that Ax + By + Cz + D = 0.

2017-07-14 10:39:40 -0500 asked a question Quaternion to Rotate Rigid Frame

Quaternion to Rotate Rigid Frame I have arbitrary planes defined by coefficients A,B,C,D such that Ax + By + Cz + D = 0.

2017-05-18 18:13:26 -0500 commented answer Yaml List to Parameter to Vector

Wow, it looks like this did it, thanks!! Just made this change and it works as expected now.

2017-05-18 18:13:04 -0500 received badge  Supporter (source)
2017-05-18 18:13:02 -0500 marked best answer Yaml List to Parameter to Vector

Hi,

I've been trying to store a list of doubles in a yaml file, load it into the parameter server, and later pull it back out from the server into a std::vector<double> in a cpp file, on ROS Kinetic.

yaml syntax I've used:

param_name:       [ .546, -.546, -.546,  .546,  .724, .724]

I've been able to get the list up into the parameter server without issue (currently, just via a 'rosparam load' terminal command on the yaml file). 'rosparam get' commands in the terminal return the expected values from it once it's there. However, when I try to retrieve the parameter within the cpp file I run into issues:

std::vector<double> param_list
if( !nh_.getParam("/param_name", param_list) )
    ROS_ERROR("Failed to get parameter from server.");

compiles, publishes the error message and fails to populate the vector. I've had confusing issues in the past dealing with ambiguous ros parameter server types so I've also tried this with a vector of floats with the same result. I think that the syntax I've used on the retrieval end matches that demonstrated here: http://wiki.ros.org/roscpp/Overview/P...

Do I have to do something to explicitly cast the data as the right type when I load it into the parameter server from the yaml?

I've also been able to get the XmlRpc method demonstrated in the above link to work with the vector - partly. I can retrieve the data and assert the list itself to be an array:

XmlRpc::XmlRpcValue param_list;
if( !nh_.getParam("/param_name", param_list) )
    ROS_ERROR("Still failed...");
ROS_ASSERT(param_list.getType() == XmlRpc::XmlRpcValue::TypeArray);

but when I try to assert the values in the array to be doubles:

for (int32_t i = 0; i < param_list.size(); ++i) 
{
  ROS_ASSERT(param_list[i].getType() == XmlRpc::XmlRpcValue::TypeDouble);
}

I get an "assertion failed" error on running the program. If I output the values in the array they seem correct even when not asserted to be doubles, but I get compile errors about "ambiguity" when I try to assign them to another, non-XmlRpc value later on. Either way though I'd really rather avoid using XmlRpc at all if I can make the vector stuff work instead!

In the past I've had similar setups work, pulling data out of a yaml file to the parameter server and then into a cpp file, but haven't ever been able to get yaml lists to cpp vectors to work.

2017-05-18 18:13:02 -0500 received badge  Scholar (source)
2017-05-18 17:00:29 -0500 edited question Yaml List to Parameter to Vector

Yaml List to Parameter to Vector Hi, I've been trying to store a list of doubles in a yaml file, load it into the param

2017-05-18 16:53:55 -0500 edited question Yaml List to Parameter to Vector

Yaml List to Parameter to Vector Hi, I've been trying to store a list of doubles in a yaml file, load it into the param

2017-05-18 16:53:42 -0500 edited question Yaml List to Parameter to Vector

Yaml List to Parameter to Vector Hi, I've been trying to store a list of doubles in a yaml file, load it into the param

2017-05-18 16:52:05 -0500 edited question Yaml List to Parameter to Vector

Yaml List to Parameter to Vector Hi, I've been trying to store a list of doubles in a yaml file, load it into the param

2017-05-18 16:45:27 -0500 asked a question Yaml List to Parameter to Vector

Yaml List to Parameter to Vector Hi, I've been trying to store a list of doubles in a yaml file, load it into the param

2017-01-11 04:15:39 -0500 received badge  Famous Question (source)
2016-11-16 20:35:32 -0500 received badge  Notable Question (source)
2016-11-16 13:34:24 -0500 received badge  Editor (source)
2016-11-15 09:48:07 -0500 received badge  Popular Question (source)
2016-11-14 16:57:05 -0500 asked a question ur_modern_driver and teach_mode() URscript command

I'm working with a system using two UR5 arms being controlled via a pair of ur_modern drivers. I'm trying to implement a joystick button to engage teach mode on the arms, mostly because it's sometimes physically challenging in our setup to manipulate the teach-mode-d arms while holding down the Teach Pendant button.

The URscript API ( http://www.sysaxes.com/manuels/script... ) documents the 'teach_mode()' and 'end_teach_mode()' commands, and I've been trying to make the button work by publishing these commands to the URscript topic that ur_modern creates and listens to. I've had success using other URscript commands through that topic ('movej()', 'speedl()', and 'stop()' in particular), but I haven't been able to get the teach_mode() command to do anything at all.

I've read that there have historically been issues getting the Teach Pendant and ROS-I ur_driver to play well together around teach mode, because they constantly send conflicting messages - is the issue I'm having because the Teach Pendant is constantly telling the robot it's NOT in teach mode until the button on the pendant is depressed? Is there any other solution I might pursue to try to get this to work?

Thanks in advance!

EDIT 11/16/2016:

On gvdhoorn's advice below, looked into the Teach Pendant logs. The log seems to record most commands I send through the ur_modern URscript topic, but does not report anything for the teach_mode() command. Example log output:

// Enabled teach mode using the pendant, then released it:   
URControl C100A1: Robot changed mode: TEACH   
URControl C100A0: Robot changed mode: OK   
// Used URscript topic to send movej(), speedl(), and stop() commands:   
RTMachine Program stopl started   
RTMachine Program stopl started   
RTMachine Program movejstarted   
RTMachine Program stopl started   
RTMachine Program speedl started   
RTMachine Program speedl started   
RTMachine Program speedl started   
RTMachine Program speedl started   
// Sent teach_mode() commands via URscript topic --> no output on log

Sidenote - the api also lists both teach_mode() and freedrive_mode() commands, and I'm not clear on what the difference between these is... I've tried both though, to the same lack of effect.