-
Notifications
You must be signed in to change notification settings - Fork 34
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
Software Challenge Urban Pistek #11
base: master
Are you sure you want to change the base?
Conversation
Made small chnages to main and resetTurtle
} else { | ||
ROS_INFO("Action Failed"); | ||
//Infinite loop to run | ||
while(true){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you look at the tutorials we want all loops to kill if the ros master is killed so we usually use while (ros::ok())
ROS_INFO("Action Finished"); | ||
} else { | ||
ROS_INFO("Action Failed"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you're missing the ros::spinOnce function, this is the function that checks for new msgs, service calls, actions and other. its what lets us communicate between many applications running ros
int main(int argc, char **argv) { | ||
ros::init(argc, argv, "moveTurtle"); | ||
ros::NodeHandle nh; | ||
MoveTurtleAction(std::string name) : |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy nodehandle to class nodehandle
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean to put nodehandle in its own class?
Currently nodehandle is in the MoveTurtleActionClass:
class MoveTurtleAction { protected: ros::NodeHandle nh;
Hello here is my code for the software challenge, let me know what you think, thanks!