Skip to content

Commit

Permalink
Fix segfault when camara model is not still available
Browse files Browse the repository at this point in the history
Signed-off-by: Francisco Martín Rico <[email protected]>
  • Loading branch information
fmrico committed Aug 12, 2024
1 parent f438c17 commit bd1144d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions local_navigation/config/params_go2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ gridmap_updater_node:
map_frame: map
robot_frame: base_link
camera_frame: camera_color_optical_frame
size_x: 200.0
size_y: 200.0

scan_matcher:
ros__parameters:
Expand Down
2 changes: 1 addition & 1 deletion local_navigation/launch/local_navigation_go2.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def generate_launch_description():
executable='local_navigation_program',
output='screen',
parameters=[param_file],
# prefix=['xterm -e gdb -ex run --args'],
# prefix=['xterm -e gdb -ex run --args'],
# prefix=['perf record --call-graph dwarf -o perf.data'],
arguments=[],
remappings=[])
Expand Down
2 changes: 2 additions & 0 deletions local_navigation/src/local_navigation/GridmapUpdaterNode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,8 @@ GridmapUpdaterNode::update_gridmap_texture(
void
GridmapUpdaterNode::image_callback(sensor_msgs::msg::Image::UniquePtr msg)
{
if (camera_model_ == nullptr) {return;}

cv_bridge::CvImagePtr image_rgb_ptr;

try {
Expand Down

0 comments on commit bd1144d

Please sign in to comment.