Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support - Listener integration #42

Open
mat-l opened this issue Mar 6, 2017 · 0 comments
Open

Support - Listener integration #42

mat-l opened this issue Mar 6, 2017 · 0 comments

Comments

@mat-l
Copy link

mat-l commented Mar 6, 2017

Dear all,

I'd like to integrate some kind of listener into the GUI of fermi/cartesian path planner to push the "Execute Cartesian Path" trough an external event.

Therefore I created a function which is called "chatterCallback". This function executes the same functions like pushing the button:

void PathPlanningWidget::chatterCallback()
{
PathPlanningWidget::sendCartTrajectoryParamsFromUI();			 PathPlanningWidget::parseWayPointBtn_slot();
}

Before that I inserted the code for listening to an topic. Manually checking the terminal I can read the data of "rostopic echo /mytopic". This, I'd like to read out:

int argc;
char** argv;
ros::init(argc, argv, "listener");
ros::NodeHandle n;
ros::Subscriber sub = n.subscribe("mytopic", 1000, chatterCallback());
ros::spin();

I got most of the information from here: http://wiki.ros.org/ROS/Tutorials/WritingPublisherSubscriber(c%2B%2B) but anyways, it is not working. Can you help me to solve this issue?

Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant