Skip to content

Conversation

@jossiewang
Copy link
Collaborator

the stable version, tested again on 4/27

yjHuang251 and others added 30 commits January 13, 2025 22:13
Change:
    move user setting command before the working directory setting command

Reason:
    user is root when sets working directory, which cause permission denied
    problem when colcon build
Change:
    local_filter_LPF into ROS2

Note:
    haven't build yet
Modify:
    Add get_parameter in local_filter_LPF

Note:
    ros1 code in local_filter_LPF is commented
notes:
````
--- stderr: lidar_localization_pkg
/usr/lib/python3/dist-packages/setuptools/command/easy_install.py:158: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools.
  warnings.warn(
---
```
notes:
        `(os.path.join('share', package_name, 'launch'), glob(os.path.join('launch', '*.launch.py'))),`
        this only take the file end with .launch.py, so the file end with .launch will not be included
        The pattern [pxy][yma]* matches any file that has a .launch. followed by one of the characters p, x, or y and then one of the characters y, m, or a.
notes:
- to use, --ros-args --log-level debug
eg. ros2 run lidar_localization_pkg lidar_localization --ros-args --log-level debug
- move out of loop
- cov is a 6 by 6 matrix
before:
Time cost for landmarks_candidate:  0.0017452239990234375
Time cost for landmarks_candidate:  2.1457672119140625e-06
Time cost for landmarks_set:  0.0009710788726806641
Time cost for sorting:  0.00033855438232421875
Time cost for solving X:  0.0002930164337158203
Time cost for find theta:  0.00011181831359863281
Time cost for adjusting lidar_cov:  6.9141387939453125e-06
Time cost for creating lidar_pose_msg:  0.07376480102539062 // this is the problem
Time cost for setting header:  2.4557113647460938e-05
Time cost for setting x:  8.96453857421875e-05
Time cost for setting z:  4.76837158203125e-05
Time cost for setting covariance[0]:  4.506111145019531e-05
Time cost for lidar_pose:  0.07521820068359375

after:
Time cost for creating lidar_pose_msg:  7.152557373046875e-07
to use:
```
$ cd docker/local-ros2/OdomComm
$ ./pull_and_run.sh
```
ros2 topic echo /odoo_googoogoo geometry_msgs/Twist
@jossiewang jossiewang requested a review from Copilot April 27, 2025 15:19
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the stable release of the odometry component with updated node implementation, dynamic parameter configuration, and Docker compose configurations for both ROS2 and ROS1 environments.

  • Adds a new odometry node implementation and configuration in C++
  • Introduces dynamic reconfigure support and related configuration files
  • Provides updated Docker compose files for multi-container orchestration

Reviewed Changes

Copilot reviewed 320 out of 333 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
docker/local-ros2/OdomComm/docker/odometry/odometry/src/odometry_node.cpp New main node initialization and exception handling for odometry
docker/local-ros2/OdomComm/docker/odometry/odometry/param/odometry_comm.yaml YAML configuration parameters for odometry node behavior
docker/local-ros2/OdomComm/docker/odometry/odometry/lib/odometry.cpp Core odometry logic including parameter updates, callbacks, and dynamic reconfigure
docker/local-ros2/OdomComm/docker/odometry/odometry/include/odometry/odometry.h Header declarations for odometry functionality
docker/local-ros2/OdomComm/docker/odometry/odometry/cfg/odometry_param.cfg Dynamic reconfigure configuration file for runtime parameters
docker/local-ros2/OdomComm/docker/compose.yml Docker compose file setting up the ROS2 and ROS1-bridge containers
docker/local-ros2/OdomComm/docker/compose-serial.yaml Docker compose file for a ROS1 serial container
Files not reviewed (13)
  • docker/local-ros2/Dockerfile: Language not supported
  • docker/local-ros2/OdomComm/_run.sh: Language not supported
  • docker/local-ros2/OdomComm/build_and_run.sh: Language not supported
  • docker/local-ros2/OdomComm/docker/Dockerfile: Language not supported
  • docker/local-ros2/OdomComm/docker/Dockerfile-rosserial: Language not supported
  • docker/local-ros2/OdomComm/docker/odometry/odometry/CMakeLists.txt: Language not supported
  • docker/local-ros2/OdomComm/docker/odometry/odometry/launch/odometry_comm.launch: Language not supported
  • docker/local-ros2/OdomComm/docker/odometry/odometry/package.xml: Language not supported
  • docker/local-ros2/OdomComm/docker/odometry/rosserial_msgs/CHANGELOG.rst: Language not supported
  • docker/local-ros2/OdomComm/docker/odometry/rosserial_msgs/CMakeLists.txt: Language not supported
  • docker/local-ros2/OdomComm/docker/odometry/rosserial_msgs/msg/Log.msg: Language not supported
  • docker/local-ros2/OdomComm/docker/odometry/rosserial_msgs/msg/TopicInfo.msg: Language not supported
  • docker/local-ros2/OdomComm/docker/odometry/rosserial_msgs/package.xml: Language not supported
Comments suppressed due to low confidence (1)

docker/local-ros2/OdomComm/docker/odometry/odometry/lib/odometry.cpp:107

  • The default value for a boolean parameter should be set to 'false' rather than '0' for readability. Replace '0' with 'false'.
if(this->nh_local_.param<bool>("using_nav_vel_cb", p_sub_from_nav_, 0)){

Comment on lines 24 to 26
gen.add("covariance_multi_vx", double_t, 0, "Covariance multiplican for vx", 0.5, 0, 9)
gen.add("covariance_multi_vy", double_t, 0, "Covariance multiplican for vy", 0.5, 0, 9)
gen.add("covariance_multi_vz", double_t, 0, "Covariance multiplican for vz", 0.5, 0, 9)
Copy link

Copilot AI Apr 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider correcting the typo 'multiplican' to a clearer term such as 'multiplier' to improve clarity in the parameter description.

Suggested change
gen.add("covariance_multi_vx", double_t, 0, "Covariance multiplican for vx", 0.5, 0, 9)
gen.add("covariance_multi_vy", double_t, 0, "Covariance multiplican for vy", 0.5, 0, 9)
gen.add("covariance_multi_vz", double_t, 0, "Covariance multiplican for vz", 0.5, 0, 9)
gen.add("covariance_multi_vx", double_t, 0, "Covariance multiplier for vx", 0.5, 0, 9)
gen.add("covariance_multi_vy", double_t, 0, "Covariance multiplier for vy", 0.5, 0, 9)
gen.add("covariance_multi_vz", double_t, 0, "Covariance multiplier for vz", 0.5, 0, 9)

Copilot uses AI. Check for mistakes.
- /dev/shm:/dev/shm
environment:
- ROS_DOMAIN_ID=43
# - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp=value
Copy link

Copilot AI Apr 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The environment variable 'RMW_IMPLEMENTATION' appears to have an extraneous '=value' appended. Remove '=value' so it correctly sets to 'rmw_cyclonedds_cpp'.

Suggested change
# - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp=value
# - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp

Copilot uses AI. Check for mistakes.
@jossiewang jossiewang requested a review from wintera1233 April 28, 2025 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants