Comments (7)
#478 here @jacobperron sir
from rclpy.
@mikaelarguedas I would like to like to contribute
from rclpy.
@suab321321 I haven't been involved in this project for a long time so can't provide feedback about the status / relevance of this ticket with respect to the current code base.
Maybe current maintainers will be able to provide more up-to-date information.
from rclpy.
It looks like we have a few custom exceptions defined already:
rclpy/rclpy/src/rclpy/_rclpy.c
Lines 43 to 45 in d375c84
But a quick search yields several places in _rclpy.c that raise RuntimeError
where we might consider using custom exceptions. Whenever a call to the rcl
layer errors, at the very least we could return a generic RCLError
exception (I think this is what rclcpp does).
@suab321321 If you'd like to contribute to this ticket, I think a good first step would be to replace instances of RuntimeError with a new RCLError whenever there's a failed call to the rcl layer.
I suggest reviewing documentation on writing C-extensions for Python, in particular this section on errors and exceptions. You can add logic to initialize the new exception next to the other exceptions:
rclpy/rclpy/src/rclpy/_rclpy.c
Lines 5088 to 5099 in d375c84
from rclpy.
@jacobperron okay sir I will proceed with this
from rclpy.
@jacobperron sir I have to make RCLError first right?
from rclpy.
I have to make RCLError first right?
Correct. You can declare and initialize it in the two places of the code I referenced (#31 (comment)).
from rclpy.
Related Issues (20)
- KeyError in ActionServer._execute_goal HOT 5
- [Feature] Static Type Checking With ament_mypy HOT 1
- Added optional TimerInfo to timer callback HOT 1
- :farmer: `test_guard_condition` failing consisntent in CycloneDDS HOT 2
- Add utility function to get datetime.datetime from Time HOT 1
- Decode ROS2 raw byte data using rclpy.serialization.deserialize_message HOT 3
- Rate object's destroy() does not destroy the underlying Timer object, leading to CPU usage explosion HOT 6
- Update the executor to not throw ExternalShutdownException
- Make nodes, publishers, subscriptions, services, clients, action servers, action clients Python context managers HOT 1
- aarch64 cross compiling HOT 9
- Executors mishandle invalid waitables HOT 4
- context.on_shutdown is never called HOT 7
- Bad interaction between `torch.compile` and `MultiThreadedExecutor` HOT 1
- First Time Contributors Documentation (CONTRIBUTING.md) HOT 2
- Python message with uint32 Assertion `PyLong_Check(field)' failed HOT 2
- Memory leak in ActionServer. ```taken_data = self._handle.take_goal_request``` HOT 4
- [Bug] error when node created with rclpy.node.Node HOT 1
- Async tasks are processed in LIFO not FIFO HOT 4
- Incompatibility with calling spin_until_future_complete while in callback HOT 11
- Logging with `rclpy` to file misses messages unless accompanied by a consistent stream HOT 2
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 rclpy.