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

mortenpj's profile - activity

2022-03-21 16:11:12 -0500 received badge  Good Question (source)
2018-02-24 18:52:20 -0500 received badge  Nice Question (source)
2017-04-20 16:27:45 -0500 received badge  Popular Question (source)
2017-04-20 16:27:45 -0500 received badge  Notable Question (source)
2017-04-20 16:27:45 -0500 received badge  Famous Question (source)
2016-04-18 18:18:31 -0500 received badge  Student (source)
2015-02-20 08:07:02 -0500 received badge  Famous Question (source)
2014-03-07 02:01:03 -0500 received badge  Necromancer (source)
2014-03-07 02:01:03 -0500 received badge  Teacher (source)
2014-02-25 04:48:40 -0500 received badge  Notable Question (source)
2014-02-25 00:58:20 -0500 received badge  Popular Question (source)
2014-02-24 21:04:12 -0500 commented answer How to update Rviz after parameters are changed elsewhere?

Unfortunately i don't have a service called clear. I have implemented your last suggestion in my c++ code, and it doesn't seems to work. Can you try to explain why it should work? Maybe it would give me some ideas.

2014-02-24 19:52:11 -0500 asked a question How to update Rviz after parameters are changed elsewhere?

Hi,

I am using the C++ move_group_interface and the GUI (Rviz Plugin), shown in the image below, but then I change a parameter in the C++ interface, it isn't updated in Rviz.

image description

For example if i change the Planning time by this function setPlanningTime() and read it again in the C++ interface i get the right value, but the value shown in Rviz is still the old value.

If i change the Planning Time value in the GUI (Rviz plugin) and tries to write it to the terminal from my c++ code through the C++ interface with the line below, it doesn't know the Planning time value set in the GUI.

ROS_INFO("Planning Time: %f", group.getPlanningTime());

Is there a way to update the parameters in Rviz then they are changed from the C++ interface or vice versa?

I am using:

  • ROS Groovy
  • Ubuntu 12.04
2014-02-24 19:39:41 -0500 received badge  Enthusiast
2014-02-11 02:04:22 -0500 asked a question How to make use of actionfiles between two packages?

Hi,

I am trying to make use of actionlib between two packages in the same workspace, but when I "catkin_make" the workspace I get the following error:

workspace/src/skills/src/master.cpp:63:33: fatal error: ur5_proxy/ur5Action.h: No such file or directory

The ur5Action.h plus additional action files are created in another package called ur5_proxy, and is placed in a directory called workspace/devel/include/ur5_proxy

So my question is how do I make use of actionfiles created in the ur5_proxy package in the skills package? I think the problem concerns the CMakelist or the package.xml.

2014-02-10 00:32:43 -0500 answered a question import stl into moveit

I had the same problem when I saved my CAD model as a .stl file in binary format. It worked for me to save my CAD model as a .stl file in aschii format in SolidWorks.

2014-01-30 06:44:43 -0500 received badge  Famous Question (source)
2014-01-30 03:42:46 -0500 received badge  Famous Question (source)
2013-12-01 04:36:57 -0500 received badge  Notable Question (source)
2013-11-13 06:27:20 -0500 received badge  Popular Question (source)
2013-11-13 02:11:53 -0500 commented answer Problem with nodehandle before ros::init

Thanks for your answer! I made it work with a few corrections to your suggestion. I added the type to acRq3 and acUr5 in the function. Changed acUr5.sendGoalAndWait to acUr5->sendGoalAndWait. And I have passed an argument to the function MoveTo(acUr5).

2013-11-13 00:13:41 -0500 received badge  Notable Question (source)
2013-11-13 00:08:24 -0500 asked a question Problem with nodehandle before ros::init

Hi

I have inserted a shortened version of my files below, but first i'll try to explain my problem. My problem is that I want to define a MoveTo() function within skills.cpp, which uses actionlib client acUR5. I can't define the MoveTo() function without defining acUr5 before the definition of the MoveTo() function in skills.cpp. The acUr5 needs ros::init(), which first have been defined in the main() function. Thus then I run execute_actionlib_client.cpp. I get the error showed in the bottom of this post.

execute_actionlib_client.cpp:

#include <ros/ros.h>
#include <actionlib/client/simple_action_client.h>
#include <actionlib/client/terminal_state.h>
#include <rq3_proxy/rq3Action.h>
#include <ur5_proxy/ur5Action.h>
#include "skills/skills.hpp"

int main (int argc, char **argv){

ros::init(argc, argv, "skills_node");

actionlib::SimpleActionClient<rq3_proxy::rq3Action> acRq3("rq3proxynode", true);
actionlib::SimpleActionClient<ur5_proxy::ur5Action> acUr5("ur5Node", true);

rq3_proxy::rq3Goal goalRq3;
ur5_proxy::ur5Goal goalUr5;

MoveTo();

Skills.cpp:

#include <ros/ros.h>
#include <actionlib/client/simple_action_client.h>
#include <actionlib/client/terminal_state.h>
#include <rq3_proxy/rq3Action.h>
#include <ur5_proxy/ur5Action.h>

#include "skills.hpp"

actionlib::SimpleActionClient<rq3_proxy::rq3Action> acRq3("rq3proxynode", true);
actionlib::SimpleActionClient<ur5_proxy::ur5Action> acUr5("ur5Node", true); // PROBLEM

rq3_proxy::rq3Goal goalRq3;
ur5_proxy::ur5Goal goalUr5;

void MoveTo(){
    //Viapoint, becore place
    acUr5.sendGoalAndWait(move("j", "car", 60,-508, 212, 1.7574, 0.7509, 1.714, 2, 0, 0, goalUr5),ros::Duration(30.0),ros::Duration(30.0));
    ROS_INFO("Viapoint 2 finished");
}

Problem when run:

private@pc:~/ros_ws/devel_ws$ rosrun skills execute_actionlib_client 
[FATAL] [1384343030.296120354]: You must call ros::init() before creating the first NodeHandle
[FATAL] [1384343030.296325757]: BREAKPOINT HIT
    file = /tmp/buildd/ros-groovy-roscpp-1.9.50-0precise-20131015-2117/src/libros/node_handle.cpp
    line=151

Trace/breakpoint trap (core dumped)

I hope you understand the problem and that you can help

2013-11-13 00:06:24 -0500 asked a question Problem with nodehandle before ros::init

Hi

I have inserted a shortened version of my files below, but first i'll try to explain my problem. My problem is that I want to define a MoveTo() function within skills.cpp, which uses actionlib client acUR5. I can't define the MoveTo() function without defining acUr5 before the definition of the MoveTo() function in skills.cpp. The acUr5 needs ros::init(), which first have been defined in the main() function. Thus then I run execute_actionlib_client.cpp. I get the error showed in the bottom of this post.

execute_actionlib_client.cpp:

#include <ros/ros.h>
#include <actionlib/client/simple_action_client.h>
#include <actionlib/client/terminal_state.h>
#include <rq3_proxy/rq3Action.h>
#include <ur5_proxy/ur5Action.h>
#include "skills/skills.hpp"

int main (int argc, char **argv){

ros::init(argc, argv, "skills_node");

actionlib::SimpleActionClient<rq3_proxy::rq3Action> acRq3("rq3proxynode", true);
actionlib::SimpleActionClient<ur5_proxy::ur5Action> acUr5("ur5Node", true);

rq3_proxy::rq3Goal goalRq3;
ur5_proxy::ur5Goal goalUr5;

MoveTo();

Skills.cpp:

#include <ros/ros.h>
#include <actionlib/client/simple_action_client.h>
#include <actionlib/client/terminal_state.h>
#include <rq3_proxy/rq3Action.h>
#include <ur5_proxy/ur5Action.h>

#include "skills.hpp"

actionlib::SimpleActionClient<rq3_proxy::rq3Action> acRq3("rq3proxynode", true);
actionlib::SimpleActionClient<ur5_proxy::ur5Action> acUr5("ur5Node", true); // PROBLEM

rq3_proxy::rq3Goal goalRq3;
ur5_proxy::ur5Goal goalUr5;

void MoveTo(){
    //Viapoint, becore place
    acUr5.sendGoalAndWait(move("j", "car", 60,-508, 212, 1.7574, 0.7509, 1.714, 2, 0, 0, goalUr5),ros::Duration(30.0),ros::Duration(30.0));
    ROS_INFO("Viapoint 2 finished");
}

Problem when run:

private@pc:~/ros_ws/devel_ws$ rosrun skills execute_actionlib_client 
[FATAL] [1384343030.296120354]: You must call ros::init() before creating the first NodeHandle
[FATAL] [1384343030.296325757]: BREAKPOINT HIT
    file = /tmp/buildd/ros-groovy-roscpp-1.9.50-0precise-20131015-2117/src/libros/node_handle.cpp
    line=151

Trace/breakpoint trap (core dumped)

I hope you understand the problem and that you can help

2013-10-21 21:27:11 -0500 received badge  Scholar (source)
2013-10-18 05:15:31 -0500 received badge  Popular Question (source)
2013-10-17 23:44:28 -0500 commented answer rospy subscribing to topic, how can i save a variable?

Thanks! It's is exactly what I needed! Sorry for my poor python skills! :)

2013-10-17 23:35:04 -0500 received badge  Editor (source)
2013-10-17 22:20:57 -0500 answered a question rospy subscribing to topic, how can i save a variable?

I have just tried to use a global variable in the printActivationStatus function, but when i call the variable it says:

NameError: global name 'globVar' is not defined

Maybe I should mention that the functions is in a file called SModelStatusListener. Generally my question is how I can save data from the callback function printActivationStatus:

rospy.Subscriber("SModelRobotInput", inputMsg.SModel_robot_input,  SModelStatusListener.printActivationStatus)

I have tried:

var = rospy.Subscriber("SModelRobotInput", inputMsg.SModel_robot_input,  SModelStatusListener.printActivationStatus)

But this is not possible.

I hope this clarified my problem..

2013-10-17 21:37:15 -0500 asked a question rospy subscribing to topic, how can i save a variable?

Hi

I'm fairly new to programming in python and ROS, but my problem is as follows: I am using a robot gripper, and for control purposes i need to read the status of the gripper and save it to a variable, so I can use if in control sequences. I am getting the status of the gripper by subscribing to a topic.

import roslib; roslib.load_manifest('robotiq_s_model_control')
import rospy
from robotiq_s_model_control.msg import _SModel_robot_input  as inputMsg
from robotiq_s_model_control.msg import _SModel_robot_output  as outputMsg

def Callback(data):
    myvar = data

rospy.init_node('rq3_proxy')

while not rospy.is_shutdown():
    rospy.Subscriber("SModelRobotInput", inputMsg.SModel_robot_input, Callback)
    rospy.sleep(1)

    print "myvar is: " + myvar

    if myvar == 1:
         #do something"
    elif myvar == 0:
         #do something else
    else :
         #error

So my question is: how can I make use of the myvar variable outside the Callback function?

Thanks in advance for any help you can provide, and if you need additional info, just ask for it.

/Morten

2013-10-13 22:15:45 -0500 commented answer ROS groovy update screwed up workspace setup in some cases?

Solved my problem, thanks!

2013-10-02 21:30:49 -0500 received badge  Supporter (source)