Closed Rikyugo closed 6 months ago
Hi, the issue could be because Galactic uses static param types as described here, Foxy might fail to build sometimes with ARM. You can try this:
Replace this line with this:
#ifdef ROS_DISTRO_FOXY
this->declare_parameter("usb.in");
#else
this->declare_parameter("usb.in", rclcpp::PARAMETER_INTEGER);
#endif
Hi, the issue could be because Galactic uses static param types as described here, Foxy might fail to build sometimes with ARM. You can try this:
Replace this line with this:
#ifdef ROS_DISTRO_FOXY this->declare_parameter("usb.in"); #else this->declare_parameter("usb.in", rclcpp::PARAMETER_INTEGER); #endif
I modified all codes include “rclcpp::(PARAMETER_INTEFER, PARAMETER_INTEFER ,etc.)” in node.cpp, like this:
this->declare_parameter("usb.in", rclcpp::PARAMETER_INTEGER);
⬇️
this->declare_parameter("usb.in");
Colcon build shows a successful compilation. Then I modified the serial port name(/dev/ttyTHS0) and baud rate(38400) in the YAML file, but encountered the following error:
ros2 launch ublox_gps ublox_gps_node_zedf9p-launch.py
[INFO] [launch]: All log files can be found below /home/antobot/.ros/log/2024-01-25-10-11-04-892106-antobot-desktop-19076
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [ublox_gps_node-1]: process started with pid [19078]
[ublox_gps_node-1] [INFO] [1706148665.310462691] [ublox_gps_node]: U-Blox: Opened serial port /dev/ttyTHS0
[ublox_gps_node-1] terminate called after throwing an instance of 'std::runtime_error'
[ublox_gps_node-1] what(): Could not configure serial baud rate
[ERROR] [ublox_gps_node-1]: process has died [pid 19078, exit code -6, cmd '/home/antobot/antobot_ros2/install/ublox_gps/lib/ublox_gps/ublox_gps_node --ros-args --params-file /home/antobot/antobot_ros2/install/ublox_gps/share/ublox_gps/config/zed_f9p.yaml'].
How is the data type determined in the new param declaration method? Could this be cause?
This is my serial port information:
stty -F /dev/ttyTHS0
speed 38400 baud;line=0;
min = 1;time = 0;
-barking -iconography -imaxbel
-opost
-isight -icanon -iexten -echo -echoe -echok -echoctl -echoke
this could be because of permissions issue, try sudo usermod -a -G dialout $USER and log out and log back in
Hi,I tried to build packages(ublox_gps) but errors occured This is my environments: Nvidia Orin ,arm 64 ubuntu20.04 foxy(ros1 noetic alse be installed) rclcpp:
This is my error: