@@ -33,7 +33,7 @@ def _get_library():
3333
3434 __lib .robot_model_renderer_createRobotModelRenderer .restype = robot_model_renderer_RobotModelRendererHandle
3535 __lib .robot_model_renderer_createRobotModelRenderer .argtypes = [
36- Allocator .ALLOCATOR , c_char_p , Allocator .ALLOCATOR , RobotModelRendererConfig ,
36+ Allocator .ALLOCATOR , c_char_p , Allocator .ALLOCATOR , RobotModelRendererConfig , c_bool ,
3737 ]
3838
3939 __lib .robot_model_renderer_deleteRobotModelRenderer .restype = None
@@ -85,13 +85,14 @@ def sensorMsgsEncodingToOgrePixelFormat(encoding):
8585class RobotModelRenderer (object ):
8686 """Renderer of robot model from URDF."""
8787
88- def __init__ (self , model , config , imageEncoding = None ):
88+ def __init__ (self , model , config , imageEncoding = None , warnExtrapolation = True ):
8989 """Construct the renderer.
9090
9191 :param str model: The URDF model to load.
9292 :param RobotModelRendererConfig config: Configuration of this class.
9393 :param imageEncoding: Encoding of the rendered image (one of sensor_msgs/image_encodings.h).
9494 :type imageEncoding: str or none
95+ :param bool warnExtrapolation: If true, warn on TF extrapolation errors.
9596 :throws RuntimeError: If construction failed.
9697 """
9798 self ._log_alloc = LogMessagesAllocator ()
@@ -104,7 +105,7 @@ def __init__(self, model, config, imageEncoding=None):
104105
105106 error_alloc = StringAllocator ()
106107 self ._handle = _get_library ().robot_model_renderer_createRobotModelRenderer (
107- self ._log_alloc_func , model .encode ("utf-8" ), error_alloc .get_cfunc (), config )
108+ self ._log_alloc_func , model .encode ("utf-8" ), error_alloc .get_cfunc (), config , warnExtrapolation )
108109
109110 self ._camera_info = None
110111 self ._flush_log_messages ()
0 commit comments