Category Archives: Error

[Solved] fastjson Error: com.alibaba.fastjson.JSONObject cannot be cast to xxxx

There is a StockData object. Normally, the JSON string to object should be:

StockData stockData = JSONObject.parseObject(str, StockData.class);

However, if the object is a generic (e.g. StockData<StockDetail>), it can be converted as above, but StockDetail throws an exception when it gets the object parameters via get com.alibaba.fastjson. JSONObject cannot be cast to cn.seagen.sorting.bean.StockDetail.

StockData<StockDetail> stockData = JSONObject.parseObject(str, StockData.class);

prompt JSONObject can not be converted to StockDetail object, the reason is probably.

fastjson conversion json object encounters a generic, it will not be correctly converted to a generic object, the converted object is a JSONObject object, not the object inside the generic, so there is also the above-thrown exception.

Solution

In addition to the above methods, fastjson also overloads a method.

public static <T> T parseObject(String text, TypeReference<T> type, Feature... features){}

Therefore, when the string is converted to a generic object, it is OK to use TypeReference for conversion. After conversion, StockDetail can normally get the parameter value of the object.

StockData<StockDetail> stockData = JSONObject.parseObject(str, new TypeReference<StockData<StockDetail>>(){});

Python draw error: ValueError: ‘color’ kwarg must be a color or sequence of color specs. For a sequence of values to b

Error Message:

ValueError: ‘color’ kwarg must be a color or sequence of color specs. For a sequence of values to b
Error Codes:

plt.scatter(data0[:,0],data0[:,1],color='',edgecolor='green',marker='o')

Solution:

plt.scatter(data0[:,0],data0[:,1],color='white',edgecolor='green',marker='o')

Git push error: error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

Problem Description:

the following error is reported during git push:

error: RPC failed; curl 92 HTTP/2 stream 0 was not closed cleanly: PROTOCOL_ERROR (err 1)

 

Solution steps:
simple solution (restore to HTTP 2 later):

git config --global http.version HTTP/1.1
git push 
git config --global http.version HTTP/2

ROS2 Navigation Run TurtleBot Simulator Error [Solved]

ROS2 galactic Version Install:
Ubuntu (Debian) — ROS 2 Documentation: Galactic documentation

Installing navigation dependency packages (Installation)
https://navigation.ros.org/getting_started/index.html

    1. Install the ROS 2 binary packages as described in the official docs Install the Nav2 packages using your operating system’s package manager:
sudo apt install ros-<ros2-distro>-navigation2
sudo apt install ros-<ros2-distro>-nav2-bringup

Install the Turtlebot 3 packages:

sudo apt install ros-<ros2-distro>-turtlebot3*

Running the Example, step 3 reports an error

    1. Start a terminal in your GUI Set key environment variables:
source /opt/ros/<ros2-distro>/setup.bash
export TURTLEBOT3_MODEL=waffle
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:/opt/ros/<ros2-distro>/share/turtlebot3_gazebo/models

In the same terminal, run

ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False

Important Log:

[controller_server-8] [INFO] [1661054727.822247083] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist

 

Full Log:

konga@ubuntu:~$ ros2 launch nav2_bringup tb3_simulation_launch.py headless:=False
[INFO] [launch]: All log files can be found below /home/konga/.ros/log/2022-08-21-12-05-20-003298-ubuntu-22365
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [gzserver-1]: process started with pid [22367]
[INFO] [gzclient-2]: process started with pid [22369]
[INFO] [robot_state_publisher-3]: process started with pid [22371]
[INFO] [rviz2-4]: process started with pid [22373]
[INFO] [map_server-5]: process started with pid [22375]
[INFO] [amcl-6]: process started with pid [22377]
[INFO] [lifecycle_manager-7]: process started with pid [22379]
[INFO] [controller_server-8]: process started with pid [22382]
[INFO] [planner_server-9]: process started with pid [22402]
[INFO] [recoveries_server-10]: process started with pid [22411]
[INFO] [bt_navigator-11]: process started with pid [22418]
[INFO] [waypoint_follower-12]: process started with pid [22433]
[INFO] [lifecycle_manager-13]: process started with pid [22441]
[robot_state_publisher-3] [WARN] [1661054720.864507459] [robot_state_publisher]: No robot_description parameter, but command-line argument available.  Assuming argument is name of URDF file.  This backwards compatibility fallback will be removed in the future.
[robot_state_publisher-3] Link base_link had 7 children
[robot_state_publisher-3] Link camera_link had 2 children
[robot_state_publisher-3] Link camera_depth_frame had 1 children
[robot_state_publisher-3] Link camera_depth_optical_frame had 0 children
[robot_state_publisher-3] Link camera_rgb_frame had 1 children
[robot_state_publisher-3] Link camera_rgb_optical_frame had 0 children
[robot_state_publisher-3] Link caster_back_left_link had 0 children
[robot_state_publisher-3] Link caster_back_right_link had 0 children
[robot_state_publisher-3] Link imu_link had 0 children
[robot_state_publisher-3] Link base_scan had 0 children
[robot_state_publisher-3] Link wheel_left_link had 0 children
[robot_state_publisher-3] Link wheel_right_link had 0 children
[robot_state_publisher-3] [INFO] [1661054720.868551659] [robot_state_publisher]: got segment base_footprint
[robot_state_publisher-3] [INFO] [1661054720.868647680] [robot_state_publisher]: got segment base_link
[robot_state_publisher-3] [INFO] [1661054720.868663701] [robot_state_publisher]: got segment base_scan
[robot_state_publisher-3] [INFO] [1661054720.868675631] [robot_state_publisher]: got segment camera_depth_frame
[robot_state_publisher-3] [INFO] [1661054720.868686801] [robot_state_publisher]: got segment camera_depth_optical_frame
[robot_state_publisher-3] [INFO] [1661054720.868698399] [robot_state_publisher]: got segment camera_link
[robot_state_publisher-3] [INFO] [1661054720.868709890] [robot_state_publisher]: got segment camera_rgb_frame
[robot_state_publisher-3] [INFO] [1661054720.868721500] [robot_state_publisher]: got segment camera_rgb_optical_frame
[robot_state_publisher-3] [INFO] [1661054720.868733165] [robot_state_publisher]: got segment caster_back_left_link
[robot_state_publisher-3] [INFO] [1661054720.868744453] [robot_state_publisher]: got segment caster_back_right_link
[robot_state_publisher-3] [INFO] [1661054720.868755393] [robot_state_publisher]: got segment imu_link
[robot_state_publisher-3] [INFO] [1661054720.868767032] [robot_state_publisher]: got segment wheel_left_link
[robot_state_publisher-3] [INFO] [1661054720.868778277] [robot_state_publisher]: got segment wheel_right_link
[map_server-5] [INFO] [1661054720.879760221] [map_server]: 
[map_server-5] 	map_server lifecycle node launched. 
[map_server-5] 	Waiting on external lifecycle transitions to activate
[map_server-5] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[map_server-5] [INFO] [1661054720.879888046] [map_server]: Creating
[lifecycle_manager-7] [INFO] [1661054720.868669904] [lifecycle_manager_localization]: Creating
[lifecycle_manager-7] [INFO] [1661054720.870975208] [lifecycle_manager_localization]: Creating and initializing lifecycle service clients
[lifecycle_manager-7] [INFO] [1661054720.876692884] [lifecycle_manager_localization]: Starting managed nodes bringup...
[lifecycle_manager-7] [INFO] [1661054720.876751414] [lifecycle_manager_localization]: Configuring map_server
[controller_server-8] [INFO] [1661054720.892359574] [controller_server]: 
[controller_server-8] 	controller_server lifecycle node launched. 
[controller_server-8] 	Waiting on external lifecycle transitions to activate
[controller_server-8] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[waypoint_follower-12] [INFO] [1661054720.914603306] [waypoint_follower]: 
[waypoint_follower-12] 	waypoint_follower lifecycle node launched. 
[waypoint_follower-12] 	Waiting on external lifecycle transitions to activate
[waypoint_follower-12] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[waypoint_follower-12] [INFO] [1661054720.915478865] [waypoint_follower]: Creating
[planner_server-9] [INFO] [1661054720.920024576] [planner_server]: 
[planner_server-9] 	planner_server lifecycle node launched. 
[planner_server-9] 	Waiting on external lifecycle transitions to activate
[planner_server-9] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-9] [INFO] [1661054720.922368666] [planner_server]: Creating
[controller_server-8] [INFO] [1661054720.935971283] [controller_server]: Creating controller server
[planner_server-9] [INFO] [1661054720.967401338] [global_costmap.global_costmap]: 
[planner_server-9] 	global_costmap lifecycle node launched. 
[planner_server-9] 	Waiting on external lifecycle transitions to activate
[planner_server-9] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-9] [INFO] [1661054720.969067014] [global_costmap.global_costmap]: Creating Costmap
[controller_server-8] [INFO] [1661054720.976103320] [local_costmap.local_costmap]: 
[controller_server-8] 	local_costmap lifecycle node launched. 
[controller_server-8] 	Waiting on external lifecycle transitions to activate
[controller_server-8] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[amcl-6] [INFO] [1661054720.976971743] [amcl]: 
[amcl-6] 	amcl lifecycle node launched. 
[amcl-6] 	Waiting on external lifecycle transitions to activate
[amcl-6] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[amcl-6] [INFO] [1661054720.977346023] [amcl]: Creating
[controller_server-8] [INFO] [1661054720.978236429] [local_costmap.local_costmap]: Creating Costmap
[recoveries_server-10] [INFO] [1661054720.988954148] [recoveries_server]: 
[recoveries_server-10] 	recoveries_server lifecycle node launched. 
[recoveries_server-10] 	Waiting on external lifecycle transitions to activate
[recoveries_server-10] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[lifecycle_manager-13] [INFO] [1661054720.995954504] [lifecycle_manager_navigation]: Creating
[lifecycle_manager-13] [INFO] [1661054721.004679416] [lifecycle_manager_navigation]: Creating and initializing lifecycle service clients
[lifecycle_manager-13] [INFO] [1661054721.013301204] [lifecycle_manager_navigation]: Starting managed nodes bringup...
[lifecycle_manager-13] [INFO] [1661054721.014373901] [lifecycle_manager_navigation]: Configuring controller_server
[controller_server-8] [INFO] [1661054721.015548236] [controller_server]: Configuring controller interface
[controller_server-8] [INFO] [1661054721.016435020] [controller_server]: getting goal checker plugins..
[controller_server-8] [INFO] [1661054721.017726333] [controller_server]: Controller frequency set to 20.0000Hz
[controller_server-8] [INFO] [1661054721.018586559] [local_costmap.local_costmap]: Configuring
[map_server-5] [INFO] [1661054721.023983603] [map_server]: Configuring
[map_server-5] [INFO] [map_io]: Loading yaml file: /opt/ros/galactic/share/nav2_bringup/maps/turtlebot3_world.yaml
[map_server-5] [DEBUG] [map_io]: resolution: 0.05
[map_server-5] [DEBUG] [map_io]: origin[0]: -10
[map_server-5] [DEBUG] [map_io]: origin[1]: -10
[map_server-5] [DEBUG] [map_io]: origin[2]: 0
[map_server-5] [DEBUG] [map_io]: free_thresh: 0.196
[map_server-5] [DEBUG] [map_io]: occupied_thresh: 0.65
[map_server-5] [DEBUG] [map_io]: mode: trinary
[map_server-5] [DEBUG] [map_io]: negate: 0
[map_server-5] [INFO] [map_io]: Loading image_file: /opt/ros/galactic/share/nav2_bringup/maps/turtlebot3_world.pgm
[controller_server-8] [INFO] [1661054721.024988310] [local_costmap.local_costmap]: Using plugin "voxel_layer"
[bt_navigator-11] [INFO] [1661054721.025097688] [bt_navigator]: 
[bt_navigator-11] 	bt_navigator lifecycle node launched. 
[bt_navigator-11] 	Waiting on external lifecycle transitions to activate
[bt_navigator-11] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[bt_navigator-11] [INFO] [1661054721.025219035] [bt_navigator]: Creating
[controller_server-8] [INFO] [1661054721.032150551] [local_costmap.local_costmap]: Subscribed to Topics: scan
[controller_server-8] [INFO] [1661054721.045146498] [local_costmap.local_costmap]: Initialized plugin "voxel_layer"
[controller_server-8] [INFO] [1661054721.045194479] [local_costmap.local_costmap]: Using plugin "inflation_layer"
[controller_server-8] [INFO] [1661054721.047109637] [local_costmap.local_costmap]: Initialized plugin "inflation_layer"
[controller_server-8] [INFO] [1661054721.055104931] [controller_server]: Created progress_checker : progress_checker of type nav2_controller::SimpleProgressChecker
[controller_server-8] [INFO] [1661054721.062998272] [controller_server]: Created goal checker : general_goal_checker of type nav2_controller::SimpleGoalChecker
[map_server-5] [DEBUG] [map_io]: Read map /opt/ros/galactic/share/nav2_bringup/maps/turtlebot3_world.pgm: 384 X 384 map @ 0.05 m/cell
[controller_server-8] [INFO] [1661054721.073954668] [controller_server]: Controller Server has general_goal_checker  goal checkers available.
[lifecycle_manager-7] [INFO] [1661054721.075886239] [lifecycle_manager_localization]: Configuring amcl
[amcl-6] [INFO] [1661054721.076157729] [amcl]: Configuring
[amcl-6] [INFO] [1661054721.076279317] [amcl]: initTransforms
[controller_server-8] [INFO] [1661054721.077383454] [controller_server]: Created controller : FollowPath of type dwb_core::DWBLocalPlanner
[controller_server-8] [INFO] [1661054721.080328048] [controller_server]: Setting transform_tolerance to 0.200000
[amcl-6] [INFO] [1661054721.091598625] [amcl]: initPubSub
[amcl-6] [INFO] [1661054721.096152765] [amcl]: Subscribed to map topic.
[lifecycle_manager-7] [INFO] [1661054721.099391920] [lifecycle_manager_localization]: Activating map_server
[map_server-5] [INFO] [1661054721.099721156] [map_server]: Activating
[map_server-5] [INFO] [1661054721.100446634] [map_server]: Creating bond (map_server) to lifecycle manager.
[amcl-6] [INFO] [1661054721.101021846] [amcl]: Received a 384 X 384 map @ 0.050 m/pix
[controller_server-8] [INFO] [1661054721.119541330] [controller_server]: Using critic "RotateToGoal" (dwb_critics::RotateToGoalCritic)
[controller_server-8] [INFO] [1661054721.120883748] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.121345685] [controller_server]: Using critic "Oscillation" (dwb_critics::OscillationCritic)
[controller_server-8] [INFO] [1661054721.123611118] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.124017486] [controller_server]: Using critic "BaseObstacle" (dwb_critics::BaseObstacleCritic)
[controller_server-8] [INFO] [1661054721.126015719] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.126783217] [controller_server]: Using critic "GoalAlign" (dwb_critics::GoalAlignCritic)
[controller_server-8] [INFO] [1661054721.128207439] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.132757063] [controller_server]: Using critic "PathAlign" (dwb_critics::PathAlignCritic)
[controller_server-8] [INFO] [1661054721.134499382] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.135182604] [controller_server]: Using critic "PathDist" (dwb_critics::PathDistCritic)
[controller_server-8] [INFO] [1661054721.136518980] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.137614779] [controller_server]: Using critic "GoalDist" (dwb_critics::GoalDistCritic)
[controller_server-8] [INFO] [1661054721.138719753] [controller_server]: Critic plugin initialized
[controller_server-8] [INFO] [1661054721.138767755] [controller_server]: Controller Server has FollowPath  controllers available.
[lifecycle_manager-13] [INFO] [1661054721.145224684] [lifecycle_manager_navigation]: Configuring planner_server
[planner_server-9] [INFO] [1661054721.145496085] [planner_server]: Configuring
[planner_server-9] [INFO] [1661054721.145538827] [global_costmap.global_costmap]: Configuring
[planner_server-9] [INFO] [1661054721.149872435] [global_costmap.global_costmap]: Using plugin "static_layer"
[planner_server-9] [INFO] [1661054721.155595142] [global_costmap.global_costmap]: Subscribing to the map topic (/map) with transient local durability
[planner_server-9] [INFO] [1661054721.156732262] [global_costmap.global_costmap]: Initialized plugin "static_layer"
[planner_server-9] [INFO] [1661054721.156787605] [global_costmap.global_costmap]: Using plugin "obstacle_layer"
[planner_server-9] [INFO] [1661054721.159489903] [global_costmap.global_costmap]: Subscribed to Topics: scan
[planner_server-9] [INFO] [1661054721.167073707] [global_costmap.global_costmap]: Initialized plugin "obstacle_layer"
[planner_server-9] [INFO] [1661054721.167122072] [global_costmap.global_costmap]: Using plugin "inflation_layer"
[planner_server-9] [INFO] [1661054721.169217818] [global_costmap.global_costmap]: StaticLayer: Resizing costmap to 384 X 384 at 0.050000 m/pix
[planner_server-9] [INFO] [1661054721.172473382] [global_costmap.global_costmap]: Initialized plugin "inflation_layer"
[planner_server-9] [INFO] [1661054721.183877678] [planner_server]: Created global planner plugin GridBased of type nav2_navfn_planner/NavfnPlanner
[planner_server-9] [INFO] [1661054721.183936392] [planner_server]: Configuring plugin GridBased of type NavfnPlanner
[planner_server-9] [INFO] [1661054721.192503691] [planner_server]: Planner Server has GridBased  planners available.
[lifecycle_manager-13] [INFO] [1661054721.200792028] [lifecycle_manager_navigation]: Configuring recoveries_server
[recoveries_server-10] [INFO] [1661054721.201137276] [recoveries_server]: Configuring
[lifecycle_manager-7] [INFO] [1661054721.205102928] [lifecycle_manager_localization]: Server map_server connected with bond.
[lifecycle_manager-7] [INFO] [1661054721.205160447] [lifecycle_manager_localization]: Activating amcl
[amcl-6] [INFO] [1661054721.205830108] [amcl]: Activating
[amcl-6] [INFO] [1661054721.205882135] [amcl]: Creating bond (amcl) to lifecycle manager.
[recoveries_server-10] [INFO] [1661054721.207969391] [recoveries_server]: Creating recovery plugin spin of type nav2_recoveries/Spin
[recoveries_server-10] [INFO] [1661054721.209492908] [recoveries_server]: Configuring spin
[recoveries_server-10] [INFO] [1661054721.214529117] [recoveries_server]: Creating recovery plugin backup of type nav2_recoveries/BackUp
[recoveries_server-10] [INFO] [1661054721.216551826] [recoveries_server]: Configuring backup
[recoveries_server-10] [INFO] [1661054721.224020090] [recoveries_server]: Creating recovery plugin wait of type nav2_recoveries/Wait
[recoveries_server-10] [INFO] [1661054721.225462622] [recoveries_server]: Configuring wait
[lifecycle_manager-13] [INFO] [1661054721.244608250] [lifecycle_manager_navigation]: Configuring bt_navigator
[bt_navigator-11] [INFO] [1661054721.244853696] [bt_navigator]: Configuring
[lifecycle_manager-7] [INFO] [1661054721.308835764] [lifecycle_manager_localization]: Server amcl connected with bond.
[lifecycle_manager-7] [INFO] [1661054721.308954750] [lifecycle_manager_localization]: Managed nodes are active
[lifecycle_manager-7] [INFO] [1661054721.308976164] [lifecycle_manager_localization]: Creating bond timer...
[lifecycle_manager-13] [INFO] [1661054721.311554467] [lifecycle_manager_navigation]: Configuring waypoint_follower
[waypoint_follower-12] [INFO] [1661054721.311858329] [waypoint_follower]: Configuring
[waypoint_follower-12] [INFO] [1661054721.319677799] [waypoint_follower]: Created waypoint_task_executor : wait_at_waypoint of type nav2_waypoint_follower::WaitAtWaypoint
[lifecycle_manager-13] [INFO] [1661054721.321763105] [lifecycle_manager_navigation]: Activating controller_server
[controller_server-8] [INFO] [1661054721.321982128] [controller_server]: Activating
[controller_server-8] [INFO] [1661054721.322014092] [local_costmap.local_costmap]: Activating
[controller_server-8] [INFO] [1661054721.322036107] [local_costmap.local_costmap]: Checking transform
[controller_server-8] [INFO] [1661054721.322074057] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [INFO] [1661054721.479822887] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-4] [INFO] [1661054721.479918995] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[rviz2-4] [INFO] [1661054721.518112093] [rviz2]: Stereo is NOT SUPPORTED
[amcl-6] [WARN] [1661054721.686275463] [amcl]: New subscription discovered on topic '/particle_cloud', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[rviz2-4] [INFO] [1661054721.813885816] [rviz2]: Trying to create a map of size 384 x 384 using 1 swatches
[controller_server-8] [INFO] [1661054721.822138451] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[rviz2-4] [ERROR] [1661054721.827166910] [rviz2]: Vertex Program:rviz/glsl120/indexed_8bit_image.vert Fragment Program:rviz/glsl120/indexed_8bit_image.frag GLSL link result : 
[rviz2-4] active samplers with a different type refer to the same texture image unit
[controller_server-8] [INFO] [1661054722.322248884] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054722.822160507] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054723.322205491] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054723.822234683] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054724.322215965] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054724.822211246] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054725.322197725] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054725.822223261] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054726.322220660] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054726.822223380] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054727.322217193] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist
[controller_server-8] [INFO] [1661054727.822247083] [local_costmap.local_costmap]: Timed out waiting for transform from base_link to odom to become available, tf error: Invalid frame ID "odom" passed to canTransform argument target_frame - frame does not exist

Solution:

Before running, build the Gazebo environment and execute this script:

source  /usr/share/gazebo/setup.bash

How to Solve J-link Error (Two Command Errors & Solution)

1. The JLINK driver version is too high, resulting in the identification that the JLINK tool is pirated

error reported: the connected probe appears to be a j-link clone

1. Uninstall the high version JLINK driver. The version here is 7.6

find the jink driver installation directory and click Remove J-Link V7.64b

2. Install j-link version 6. X driver

download address: segger – the embedded experts – Downloads – j-link/J-TRACE

install directly after downloading

3. Change the j-link driver under MDK5 to a lower version

find the newly installed JLINK driver installation directory. The default is: C:\Program Files (x86)\SEGGER\JLink_V640b

find jlinkarm.dll file, replace this file under mdk5, and the directory under mdk5 is: ..\MDK528\ARM\Segger

reopen mdk5 and connect the development board to JLINK. At this time, you can view that the JLINK driver version is updated successfully</ font>

2. JLINK chip locked

error reported: JLINK error: could not find core in coresight setup 

found in JLINK installation directory: JLINK.exe

enter after opening:

unlock kinetis

if the connection fails, connect the reset pin on the JLINK download tool and GND to perform the chip burning reset operation. Repeat it several times and it will succeed

[Solved] Eclipse SVN Plug-in Submit Error: org.eclipse.team.svn.core.connector.SVNConnectorException…

Error Message:

org.eclipse.team.svn.core.connector.SVNConnectorException: svn: E175002: SSL handshake failed: 'The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]'

Solution:

Open Eclipse Setting:
Preference->Version Control(Team)->SVN
Check [SVN Connector] on the right tab
Inside the SVN Connector dropdown box to change an option, I am choosing Native Java HL 1.8… The problem was solved.

[Solved] AndroidStudio package Invalid keystore format Error: Execution failed for task ‘:examplecases:packageRelease’…

Post error information first

Execution failed for task ':examplecases:packageRelease'.
> A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable
   > com.android.ide.common.signing.KeytoolException: Failed to read key aaa from store "C:\Users\a\Desktop\NewProject\aaa.jks": Invalid keystore format

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

 

 

Solution:

Open file -> settings.

Set the JDK version to 11, repack and solve the problem.

[Solved] Tomcat Error: Failed to start componen

I make a crud project of servlet + JSP, and start Tomcat with an error:

org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/oa3]]

It was found that the path was not added ‘/’

//@WebServlet("dept/list")
//Add slash!
@WebServlet("/dept/list")
public class DeptServlet extends HttpServlet {

 

IOS Adds C File Error [How to Solve]

Reason: This is actually the logic of using pch files in Xcode compilation, after introducing c files in the project, pch will mix #include and #import, in order to reduce compiler workload, you need to use precompiled macros to make a slight distinction.

Solution: Check all pch files in the project and put “#import xxx”, which is only used in OC, in “#indef __OBJC__” and “#endif”

#ifndef PrefixHeader_pch
#define PrefixHeader_pch

#ifdef __OBJC__

#import "Masonry.h"

#endif


#endif /* PrefixHeader_pch */

How to Solve Svn upload so File Error

Cause of the problem: since the so file is a binary file, it is ignored by default. You need to modify the configuration before uploading

Solution:

find   / -name .subversion # find SVN configuration file path

cd to find the path of .subversion

VIM config finds these two lines:

#global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *pyo

#  *.rej *~#*# .#* .*.swp.DS_Store

Modified as:

###global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *pyo

###  *.rej *~#*# .#* .*.swp.DS_Store

global-ignores = .*.swp.DS_Store

It can be solved after saving!

[Solved] SpringBoot Integrates Swagge Error: Failed to start bean ‘documentationPluginsBootstrapper‘

Error message

org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.NullPointerException
	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.22.jar:5.3.22]
	at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.22.jar:5.3.22]
	at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.22.jar:5.3.22]
	at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_131]
	at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.22.jar:5.3.22]
	at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.22.jar:5.3.22]
	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935) ~[spring-context-5.3.22.jar:5.3.22]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.22.jar:5.3.22]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.3.jar:2.7.3]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) [spring-boot-2.7.3.jar:2.7.3]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) [spring-boot-2.7.3.jar:2.7.3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) [spring-boot-2.7.3.jar:2.7.3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) [spring-boot-2.7.3.jar:2.7.3]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) [spring-boot-2.7.3.jar:2.7.3]
	at com.yuhuofei.SpringbootSwaggerApplication.main(SpringbootSwaggerApplication.java:10) [classes/:na]
Caused by: java.lang.NullPointerException: null
	at springfox.documentation.spring.web.WebMvcPatternsRequestConditionWrapper.getPatterns(WebMvcPatternsRequestConditionWrapper.java:56) ~[springfox-spring-webmvc-3.0.0.jar:3.0.0]
	at springfox.documentation.RequestHandler.sortedPaths(RequestHandler.java:113) ~[springfox-core-3.0.0.jar:3.0.0]
	at springfox.documentation.spi.service.contexts.Orderings.lambda$byPatternsCondition$3(Orderings.java:89) ~[springfox-spi-3.0.0.jar:3.0.0]
	at java.util.Comparator.lambda$comparing$77a9974f$1(Comparator.java:469) ~[na:1.8.0_131]
	at java.util.TimSort.countRunAndMakeAscending(TimSort.java:355) ~[na:1.8.0_131]
	at java.util.TimSort.sort(TimSort.java:220) ~[na:1.8.0_131]
	at java.util.Arrays.sort(Arrays.java:1512) ~[na:1.8.0_131]
	at java.util.ArrayList.sort(ArrayList.java:1454) ~[na:1.8.0_131]
	at java.util.stream.SortedOps$RefSortingSink.end(SortedOps.java:387) ~[na:1.8.0_131]
	at java.util.stream.Sink$ChainedReference.end(Sink.java:258) ~[na:1.8.0_131]
	at java.util.stream.Sink$ChainedReference.end(Sink.java:258) ~[na:1.8.0_131]
	at java.util.stream.Sink$ChainedReference.end(Sink.java:258) ~[na:1.8.0_131]
	at java.util.stream.Sink$ChainedReference.end(Sink.java:258) ~[na:1.8.0_131]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_131]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_131]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_131]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_131]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_131]
	at springfox.documentation.spring.web.plugins.WebMvcRequestHandlerProvider.requestHandlers(WebMvcRequestHandlerProvider.java:81) ~[springfox-spring-webmvc-3.0.0.jar:3.0.0]
	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) ~[na:1.8.0_131]
	at java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1374) ~[na:1.8.0_131]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481) ~[na:1.8.0_131]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471) ~[na:1.8.0_131]
	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708) ~[na:1.8.0_131]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_131]
	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499) ~[na:1.8.0_131]
	at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.withDefaults(AbstractDocumentationPluginsBootstrapper.java:107) ~[springfox-spring-web-3.0.0.jar:3.0.0]
	at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.buildContext(AbstractDocumentationPluginsBootstrapper.java:91) ~[springfox-spring-web-3.0.0.jar:3.0.0]
	at springfox.documentation.spring.web.plugins.AbstractDocumentationPluginsBootstrapper.bootstrapDocumentationPlugins(AbstractDocumentationPluginsBootstrapper.java:82) ~[springfox-spring-web-3.0.0.jar:3.0.0]
	at springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper.start(DocumentationPluginsBootstrapper.java:100) ~[springfox-spring-web-3.0.0.jar:3.0.0]
	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-5.3.22.jar:5.3.22]
	... 14 common frames omitted

Use version information

  • SpringBoot 2.7.3
  • springfox-boot-starter 3.0.0

Use the above version of the dependency package for integration, start the service, and directly report the previous error. It is preliminarily determined that the problem should be caused by the version.

Cause:

After springboot 2.6.0, the default path matching policy of spring MVC was changed from AntPathMatcher to PathPatternParser, resulting in an error in starting the service.

Solution:

Add the following line of configuration information to the application.properties configuration file to solve the problem

#How to Solve swagger error
spring.mvc.pathmatch.matching-strategy=ant_path_matcher

How to Solve SpringBoot MongoDB MongoAutoConfiguration Startup Error

Background


SpringBoot project needs to manually control whether to load MongoDB auto-configuration (i.e.: MongoAutoConfiguration), then startup error

- Bean method 'mongoTemplate' in 'MongoDatabaseFactoryDependentConfiguration' not loaded because @ConditionalOnBean (types: org.springframework.data.mongodb.MongoDatabaseFactory; SearchStrategy: all) did not find any beans of type org.springframework.data.mongodb.MongoDatabaseFactory

code:

@Import(value = {MongoDataAutoConfiguration.class, MongoAutoConfiguration.class})

Solution: Replace @Import content order, load MongoAutoConfiguration first

@Import(value = {MongoAutoConfiguration.class, MongoDataAutoConfiguration.class})