Comments (3)
Apparently, I just needed to voice my problem to have the solution work, (guess I should invest in a rubber duck.) I will leave this issue open for a little longer, as the resulting solution is incredibly hacky and may have underlying problems.
Simply creating yet another signalhanlder over-ride (as mentioned in roscpp and 317 linked above) closes everything correctly. I'm not very content on this solution, because I tried this the other day and it didn't change anything. Not sure why it worked this time around, but the edits I made are:
Starting around line 655 in create_driver.cpp
void mySigintHandler(int sig){ //ADDITION
rclcpp::shutdown(); //ADDITION
} //ADDITION
int main(int argc, char** argv)
{
rclcpp::init(argc, argv);
auto create_driver = std::make_shared<CreateDriver>();
signal(SIGINT, mySigintHandler); //ADDITION
try
{
rclcpp::spin(create_driver);
std::cout <<"PRINT" <<std::endl; //NOW THIS CORRECTLY PRINTS!
}
catch (std::runtime_error& ex)
{
RCLCPP_FATAL_STREAM(create_driver->get_logger(), "[CREATE] Runtime error: " << ex.what());
return 1;
}
rclcpp::shutdown();
return 0;
}
Again, a second opinion is greatly appreciated on this so I'll leave the issue for at least a couple days.
Thanks!
from create_robot.
Thanks for opening the issue! I suspect that the signal handler registered by libcreate
is interferring with the rclcpp
signal handler. I'll see if I can reproduce later this evening.
from create_robot.
@cbcoutu
I was able to reproduce the issue (thanks for the detailed investigation!). I think #89 should fix this issue, which depends on a new option in libcreate for disabling it's signal handler (AutonomyLab/libcreate#65). If you are able to try it out and report back that would be awesome 🙂
from create_robot.
Related Issues (20)
- Joy_teleop is not publishing to cmd_vel
- Roomba 800 - where to start ? HOT 2
- Verifying library on Roomba 980
- Is there a way to connect several roombas at the same time? HOT 4
- Unknown mode detected HOT 26
- Print linear velocity and angle to terminal [Help Wanted] HOT 3
- Launching create_autonomy in gazebo? HOT 9
- How to publish covariance for ekf HOT 3
- roomba 527 `terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >' what(): write: Input/output error` HOT 2
- OI mode at shutdown for charging battery HOT 1
- Support IR Omni and bumper sensors in Gazebo HOT 3
- Roomba 581 - moves with xbox360 joy and "create_2.launch"
- How to Incorporate Wall Following with Autonomy Lab HOT 2
- Odometry error is huge while rotate in place HOT 1
- Create2 wheel control is wrong when low speed HOT 3
- Transform from Map -> Base Footprint uses a weird time transform HOT 1
- No `/mode` topic or service HOT 2
- Ros2 Redesign HOT 1
- roboti
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from create_robot.