rclpy icon indicating copy to clipboard operation
rclpy copied to clipboard

Missing exception states in rclpy

Open hemantku opened this issue 7 years ago • 3 comments

Feature request

rclpy seems to missing ROS Exceptions from rospy

Feature description

rospy has the following exceptions:

  1. ROSInterruptException/ROSException - used in joint_state_publisher
  2. ROSInitException - used in joint_state_publisher
  3. ROSTimeMovedBackwardsException
  4. ROSInternalException
  5. TransportException/TransportTerminated/TransportInitError

rclpy seems to missing all the above exceptions. The following are more relevant to the migration

  1. ROSInterruptException/ROSException - used in joint_state_publisher
  2. ROSInitException - used in joint_state_publisher

Additionally, it might be useful to have ROSTimeMovedBackwardsException, I am not sure about 4 and 5

https://github.com/ros/ros_comm/blob/60be2504d5341eb3bc80d86e5d16f1c53dc97ccd/clients/rospy/src/rospy/exceptions.py

Implementation considerations

  1. There is existing exceptions.py which could be extended to encase the missing exception
  2. Create rosexception.py which entails all these exceptions

hemantku avatar Aug 15 '18 18:08 hemantku

Reference: https://discourse.ros.org/t/mapping-between-rospy-and-rclpy/5737?u=wjwwood

wjwwood avatar Aug 16 '18 17:08 wjwwood

Hi @hemantku, are there more exceptions than ROSInterruptExcption that you would like to see ported? Would you mind adding to the issue description the exceptions you would like to see and the use cases that needs them? I think if the ticket was more specific it would be easier to ask for help on and could be completed quicker.

sloretz avatar Aug 16 '18 17:08 sloretz

Hi @sloretz, I have made the ticket more specific(sorry about making it generic). I can add these exceptions if you guys agree with what I see I can make change and send you guys the PR

hemantku avatar Aug 16 '18 22:08 hemantku