Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update odom transform to include crazyflie name #557

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crazyflie/scripts/crazyflie_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ def _log_odom_data_callback(self, timestamp, data, logconf, uri):

t_base = TransformStamped()
t_base.header.stamp = self.get_clock().now().to_msg()
t_base.header.frame_id = 'odom'
t_base.header.frame_id = cf_name +'/odom'
t_base.child_frame_id = cf_name
t_base.transform.translation.x = x
t_base.transform.translation.y = y
Expand Down
2 changes: 1 addition & 1 deletion crazyflie/scripts/simple_mapper_multiranger.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def __init__(self):
t_map = TransformStamped()
t_map.header.stamp = self.get_clock().now().to_msg()
t_map.header.frame_id = 'map'
t_map.child_frame_id = 'odom'
t_map.child_frame_id = robot_prefix + '/odom'
t_map.transform.translation.x = 0.0
t_map.transform.translation.y = 0.0
t_map.transform.translation.z = 0.0
Expand Down
4 changes: 2 additions & 2 deletions crazyflie_examples/config/nav2_params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ local_costmap:
ros__parameters:
update_frequency: 5.0
publish_frequency: 2.0
global_frame: odom
global_frame: cf1/odom
robot_base_frame: cf1
use_sim_time: true
rolling_window: true
Expand Down Expand Up @@ -226,4 +226,4 @@ waypoint_follower:
wait_at_waypoint:
plugin: "nav2_waypoint_follower::WaitAtWaypoint"
enabled: True
waypoint_pause_duration: 200
waypoint_pause_duration: 200
2 changes: 1 addition & 1 deletion crazyflie_examples/launch/multiranger_mapping_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def generate_launch_description():
),
Node(
parameters=[
{'odom_frame': 'odom'},
{'odom_frame': 'cf231/odom'},
{'map_frame': 'map'},
{'base_frame': 'cf231'},
{'scan_topic': '/cf231/scan'},
Expand Down
Loading