ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

jxl's profile - activity

2023-08-09 03:14:02 -0500 received badge  Famous Question (source)
2023-08-02 02:56:32 -0500 commented answer ROS2 How to get an array from get_parameter?

rclcpp::Parameter std::vector<int> ros_vec; ros_vec = this->get_parameter("ros_vec").as_integer_array();

2023-08-02 02:56:20 -0500 commented answer ROS2 How to get an array from get_parameter?

rclcpp::Parameter std::vector<int> ros_vec; ros_vec = this->get_parameter("ros_vec").as_integer_array();

2023-08-02 02:55:24 -0500 commented answer ROS2 How to get an array from get_parameter?

rclcpp::Parameter std::vector<int> ros_vec; ros_vec = this->get_parameter("ros_vec").as_integer_array();

2023-08-02 02:55:14 -0500 commented answer ROS2 How to get an array from get_parameter?

rclcpp::Parameter std::vector<int> ros_vec; ros_vec = this->get_parameter("ros_vec").as_integer_array();

2023-06-30 11:02:34 -0500 received badge  Famous Question (source)
2023-03-12 10:41:13 -0500 received badge  Necromancer (source)
2023-03-12 10:41:13 -0500 received badge  Self-Learner (source)
2023-03-09 16:39:40 -0500 received badge  Famous Question (source)
2023-02-07 07:15:29 -0500 received badge  Self-Learner (source)
2023-02-05 21:12:25 -0500 marked best answer the same msg type of multiple topic names can use only one callback on ros2?

Hello, I have /camera_1, /camera_2, /camera_3 and /camera_4 which are published by 4 client nodes. The 4 topics process are all the same (save received msg into one buffer variable ). Could I bind only one callback to 4 rclcpp::Subscription objects? Thanks for your help a lot!

2023-02-05 21:12:06 -0500 answered a question the same msg type of multiple topic names can use only one callback on ros2?

m_client_topic_subs_.clear(); //std::vector<rclcpp::SubscriptionBase::SharedPtr> m_client_topic_subs_;

2023-02-05 21:01:52 -0500 received badge  Notable Question (source)
2023-02-05 21:01:52 -0500 received badge  Popular Question (source)
2023-01-17 19:18:16 -0500 received badge  Notable Question (source)
2023-01-09 21:14:36 -0500 asked a question the same msg type of multiple topic names can use only one callback on ros2?

the same msg type of multiple topic names can use only one callback on ros2? Hello, I have "/camera_1" "/camera_2" "

2022-09-03 22:18:41 -0500 received badge  Popular Question (source)
2022-08-23 16:39:52 -0500 received badge  Nice Question (source)
2022-05-25 07:52:40 -0500 received badge  Famous Question (source)
2022-04-26 06:33:30 -0500 received badge  Notable Question (source)
2022-04-26 06:33:30 -0500 received badge  Famous Question (source)
2022-03-29 03:12:17 -0500 marked best answer ros2 lookupTransform() to get latest transform

Hello all,

In foxy tf2_ros::Buffer::lookupTransform(),

geometry_msgs::msg::TransformStamped 
tf2_ros::Buffer::lookupTransform(const std::string&     target_frame,
                  const std::string&    source_frame,
                  const tf2::TimePoint& time,
                  const tf2::Duration   timeout ) const
 @param time:   The time at which the value of the transform is desired. (0 will get the latest)

We can use tf2::TimePoint(std::chrono::nanoseconds(0)) to get the latest transform. In foxy tf2 namespace

using tf2::Duration = typedef std::chrono::nanoseconds
using tf2::TimePoint = typedef std::chrono::time_point<std::chrono::system_clock, Duration>

tf2::TimePoint use system_clock. Although we can use tf2::TimePoint fromRclcpp(const rclcpp::Time & time) to convert a rclcpp::Time into tf2::TimePoint, rclcpp::Time may be use a ROS time, such as RCL_ROS_TIME time source

inline tf2::TimePoint fromRclcpp(const rclcpp::Time & time)
{
  // tf2::TimePoint is a typedef to a system time point, but rclcpp::Time may be ROS time.
  // Ignore that, and assume the clock used from rclcpp time points is consistent.
  return tf2::TimePoint(std::chrono::nanoseconds(time.nanoseconds()));
}

My question is:
1: Could we directly use rclcpp::Time lookupTransform() version to get latest transform, no need to convert into tf2::TimePoint ?

2: AutowareArchitectureProposal: Replacing tf2_ros::Buffer says there is some bug in tf2_ros::Buffter, is it true ?

Thanks for your help and time!

2022-03-28 21:23:11 -0500 commented answer ros2 lookupTransform() to get latest transform

@timRO, thanks for your help :). tf2::TimePointZero is defined here line=50 btw. Did you meet tf net delay is very big

2022-03-28 21:22:47 -0500 commented answer ros2 lookupTransform() to get latest transform

@timRO, thanks for your help :). tf2::TimePointZero is defined here line=50 BTW. Did you meet tf net delay is very big

2022-03-28 21:22:23 -0500 commented answer ros2 lookupTransform() to get latest transform

@timRO, thanks for your help :). tf2::TimePointZero is defined [here line=50], (https://docs.ros2.org/foxy/api/tf2/time

2022-03-28 01:23:44 -0500 received badge  Notable Question (source)
2022-03-26 02:07:57 -0500 received badge  Popular Question (source)
2022-03-25 04:39:36 -0500 asked a question tf2_monitor net delay and hz when playing ros2 bag

tf2_monitor net delay and hz when playing ros2 bag Hello all, My robot base node, which publish odom to base_link tf on

2022-03-25 02:48:49 -0500 edited question ros2 lookupTransform() to get latest transform

ros2 lookupTransform() to get latest transform Hello all, In foxy tf2_ros::Buffer::lookupTransform(), geometry_msgs:

2022-03-25 02:47:50 -0500 asked a question ros2 lookupTransform() to get latest transform

ros2 lookupTransform() to get latest transform Hello all, In foxy tf2_ros::Buffer::lookupTransform(), geometry_msgs:

2022-03-15 05:57:07 -0500 asked a question covariance evaluation wrt localization lost

covariance evaluation wrt localization lost Hello all, I'm sorry it's not a question about ROS, but about state estimat

2022-03-14 06:08:09 -0500 received badge  Popular Question (source)
2022-03-09 04:14:00 -0500 asked a question rclcpp::Time() and rclcpp::Clock()

rclcpp::Time() and rclcpp::Clock() Hello all, I have 4 questions about ros2 time, please see the following part :) Q1:

2022-01-13 08:03:53 -0500 received badge  Good Question (source)
2021-12-20 02:08:27 -0500 asked a question Could libgazebo_ros_p3d 'bodyName' be other frame_id?

Could libgazebo_ros_p3d 'bodyName' be other frame_id? Hi all, We use libgazebo_ros_p3d to get ground truth in gazebo.

2021-04-04 16:31:43 -0500 marked best answer amcl jumped very much with debug infomation "Time jumped forward by [...] for timer of period [...] ...."

Hello,

I use robot_pose_ekf to fuse odom and imu to get a more accurate tf(from odom to base_footprint),and then let amcl use this tf to provide a tf(from map to base_footprint). And when i see the amcl wiki , it tells me we should use diff-corrected odom model. I also use likelihood_field_problaser model to let amcl not use the scans which hit unexpected obstacles such human beings ,when localizing robot with laser on the global map . In rviz ,when i see amcl provides particle_cloud,it is more converged than old models(diff mode and likelihood_field laser model), very excited and thankful!!!!

  • But sometimes when robot is moving and all particle_cloud is converged( in free map areas ,there is no particle),let us mark this time is t_ktime. Suddenly the particle_cloud is little converged than t_k time ,but it still has some particles converged in robot footprint and in map free areas, there also appears some particles.let mark this time is t_k+1time. This is t_k+1.jpg. when t_k+2time ,robot pose in map jumped very much. It jumped in some should not be place, and the amcl output particle_cloud are all converged in robot footprint, it is weird!!!,This is t_k+2.jpg.
  • when i rosbag record all the topics and rosbag play them , rqt_plot the robot_pose_ekf pose data(i write a node to get robot pose in odom ) and amcl output pose data to watch whether it because robot_pose_ekf data occured . But when i see rivz and rqt_plot,when amcl position jumped ,robot_pose_ekf position data did not jump. I guess this is not odom, imu and robot_pose_ekf' s problem. This is amcl_jumped_data_analysis.png,ans its zoomed out png1,zoomed out png2
  • This is amcl_jump_video.mp4 , amcl_jump.bag , package:to convert_orientation2Yaw_And_get_pose_ekf_position and default.rviz config file
  • when i let amcl node logger level is Debug, i see some print useful information such as "Time jumped forward by [0.364688] for timer of period [0.010000], resetting timer (current=946684907.876552),next _expected=946684907.511864"Dubug infos: Time jumped forward.jpg
  • Does amcl jumped because this message ?? how can i fixed this problem??
  • Any advice will be appreciated and thanks you very very much!!!!
2021-04-04 16:31:42 -0500 received badge  Nice Answer (source)
2021-03-17 02:42:32 -0500 answered a question pkg_resources.DistributionNotFound: The 'rospkg==1.2.3' distribution was not found and is required by the application

I use sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/lsb_release -csmain" &g

2020-12-18 13:21:07 -0500 marked best answer Libflycapture.so: undefined reference to ‘powf@GLIBC_2.27’

Hello, my system info: x86_64, Ubuntu 16.04.6, kernel 4.15.0-54-generic, gcc5.4.0, g++5.4.0, autoware-1.11.1.

Installed flycapture2-2.13.3.31-amd64-pkg_xenial, LaydbugSDK_1.16.3.48_amd64 and spinnaker-1.21.0.61-amd64-Ubuntu16.04, then reboot to build autoware. when building with AUTOWARE_COMPILE_WITH_CUDA=1 ./colcon_release, output:

/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libflycapture.so: undefined reference to  ‘powf@GLIBC_2.27’
collect2: error: ld returned 1 exit status
make[2]: *** [devel/lib/autoware_pointgrey_drivers/grasshopper3_camera] Error 1
make[1]: *** [CMakeFiles/grasshopper3_camera.dir/all] Error 2
make[1]: *** Waiting for unfinished tasks....
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libladybug.so: undefined reference to ‘FlyCapture2::AVIRecorder::AVIRecorder()’
/usr/lib/gcc/x86_64-linux-gnu/5/../../../../lib/libflycapture.so: undefined reference to ‘powf@GLIBC_2.27’
collect2: error: ld returned 1 exit status
make[2]: *** [devel/lib/autoware_pointgrey_drivers/ladybug_camera] Error 1
make[1]: *** [CMakeFiles/ladybug_camera.dir/all] Error 2
make: *** [all] Error 2
 ---
Failed   <<< autoware_pointgrey_drivers [ Exited with code 2 ]

In Autoware/ros/src/sensing/drivers/camera/packages/pointgrey, the README file doesn't specify the three matched SDK(flycapture, ladybug, spinnaker) version. How to fix this this problem? Did i missing something, thanks for your help!

2020-12-18 13:20:21 -0500 received badge  Famous Question (source)
2020-11-25 00:41:21 -0500 marked best answer setting covariance and params for robot_localization

Hello everyone ,

This link odom and imu covariances, is my odom0 and imu0 config,odom_pose_covariace, odom_twist_covariance, imu_orientation_covariace, imu_angular_velocity_covariance and imu_linear_acceleration_covariace picture(sorry ,i can't upload this picture).The left-up of the picture is odom0_config and Imu0_config,according to robot_localization_Fusing Unmeasured Variables,I use odom: X˙,Y˙and yaw˙and imu: yaw,yaw˙and X¨to fuse . The left-down of the picture is imu orientation_covariance,angular_velocity_covariaceandlinear_acceleration_covariance.The right of the picture is odom_pose_covarianceand odom_twist_covariance. Althrough i see some similar questions like these,i still have some confusions :

  • Q1 As we all know ,to 2d differential robot, odom output data: Z, vy(linear_y),vz(linear_z),wx(angular_x) and wy(angular_y)are all zero ,so when we setting the covariance for Z,roll,pitch,vy(linear_y),vz(linear_z),wx(angular_x) and wy(angular_y),should we set them a very very small value like 1e-6 ,or should we set them zero?

  • Q2 In the odom covariance for x,yand yaw,i set them are 0.01,0.01 and 0.1(actually,i have no experiance about how to set them).And then ,i think odom twist is more accurate than pose ,so i set odom_twist_covariance for and yaw˙is smaller than xand yaw. Covariance for is 0.001,and for yaw˙is 0.01.This practice is reasonable ??


In addition to the above questions,i have some questions about robot_localizationparams setting .

  • I see the ~[sensor]_differential , ~[sensor]_relative
  • -The first kind of understaning: i think if one source is enabled differential ,r_l will differentiate the variables which be used to fuse.For example,If we set odom0_config is X˙,Y˙and yaw˙and set odom0_differential:true,does it mean that :r_lwill convert X˙,Y˙and yaw˙ to X¨,Y¨,yaw''to following calculation.
  • The second kind of understaning: if one source is enabled differential ,r_l will differentiate the only pose variables X,Y,Z,roll,pitch,yaw.But if when we set odom0_config is X˙,Y˙and yaw˙and set odom0_differential:true,there is none of pose variables such as X,Y,Z,roll,pitch,yaw.
  • Q3So i'm confused about this param meaning.
  • Q4when i see The differential and relative Parameters,i have one odom and one imu .So which sensor i should enable differential,imu or odom ?
  • Q5Suppose we set odom_differential:true ,and imu_differential:false,does it mean that we must also set odom_relative:false and imu_relative:true? For the same sensor,we cannot set its differential and relative the same ,such as : false-false or true-true,because the differential and relative param are opposite meaning? Am i right?
  • Q6 AS @Tom Moore saied in this question, if you are measuring a variable, make the diagonal value in initial_estimate_covariance larger than that measurement's covariance.In my case (one odom and one imu),the diagonal value in initial_estimate_covariance should be larger than odom or imu ,or both of them ? In other words,odom belong to measurement or not ? In ...
(more)
2020-07-24 05:41:50 -0500 received badge  Famous Question (source)
2019-12-27 00:17:33 -0500 commented answer How to play and pause bagfile within the program?

rosrun my_package node_executable __name:=my_node1 set a user namespace

2019-12-27 00:17:06 -0500 commented answer How to play and pause bagfile within the program?

rosrun my_package node_executable __name:=my_node1 set a user namespace

2019-12-16 07:57:38 -0500 received badge  Famous Question (source)