Closed linClubs closed 1 month ago
Hello,thank your answer. i run catkin_make error. My versions of the software ros:noetic ,Gazebo version 11.11.0 and ros:melodic,Gazebo version 9.0.0,both versions is the same error.
Consolidate compiler generated dependencies of target gazebo_ros_velodyne_laser
[ 50%] Building CXX object velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/CMakeFiles/gazebo_ros_velodyne_laser.dir/src/GazeboRosVelodyneLaser.cpp.o
/home/lin/ros_code/test_ws/src/velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/src/GazeboRosVelodyneLaser.cpp: In member function ‘void gazebo::GazeboRosVelodyneLaser::putLaserData(gazebo::common::Time&)’:
/home/lin/ros_code/test_ws/src/velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/src/GazeboRosVelodyneLaser.cpp:240:3: error: ‘math’ has not been declared
240 | math::Angle maxAngle = parent_raysensor->AngleMax();
| ^~~~
/home/lin/ros_code/test_ws/src/velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/src/GazeboRosVelodyneLaser.cpp:241:3: error: ‘math’ has not been declared
241 | math::Angle minAngle = parent_raysensor->AngleMin();
| ^~~~
/home/lin/ros_code/test_ws/src/velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/src/GazeboRosVelodyneLaser.cpp:251:3: error: ‘math’ has not been declared
251 | math::Angle verticalMaxAngle = parent_raysensor->VerticalAngleMax();
| ^~~~
/home/lin/ros_code/test_ws/src/velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/src/GazeboRosVelodyneLaser.cpp:252:3: error: ‘math’ has not been declared
252 | math::Angle verticalMinAngle = parent_raysensor->VerticalAngleMin();
| ^~~~
/home/lin/ros_code/test_ws/src/velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/src/GazeboRosVelodyneLaser.cpp:269:18: error: ‘maxAngle’ was not declared in this scope
269 | double yDiff = maxAngle.Radian() - minAngle.Radian();
| ^~~~
/home/lin/ros_code/test_ws/src/velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/src/GazeboRosVelodyneLaser.cpp:269:38: error: ‘minAngle’ was not declared in this scope
269 | double yDiff = maxAngle.Radian() - minAngle.Radian();
| ^~~~
/home/lin/ros_code/test_ws/src/velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/src/GazeboRosVelodyneLaser.cpp:270:18: error: ‘verticalMaxAngle’ was not declared in this scope
270 | double pDiff = verticalMaxAngle.Radian() - verticalMinAngle.Radian();
| ^~~~
/home/lin/ros_code/test_ws/src/velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/src/GazeboRosVelodyneLaser.cpp:270:46: error: ‘verticalMinAngle’ was not declared in this scope
270 | double pDiff = verticalMaxAngle.Radian() - verticalMinAngle.Radian();
| ^~~~
/home/lin/ros_code/test_ws/src/velo2cam_gazebo/gazebo_plugins/velodyne_gazebo_plugin/src/GazeboRosVelodyneLaser.cpp: In member function ‘void gazebo::GazeboRosVelodyneLaser::onStats(const boost::shared_ptr
Please check #13. I think you are facing the same issue.
I managed to compile it successfully based on the suggestion and the forum in the reply
Please check #13. I think you are facing the same issue.
My environment is ROS melodic with Gazebo 9. I made the following changes:
add this
#include <ignition/math/Vector3.hh>
change any math to ignition::math as in this example (about line 239-240, and other similar places in the file)
ignition::math::Angle maxAngle = parent_ray_sensor_->AngleMax();
change the last function at the end of the file to this:
ignition::math::Pose3d pose; pose.Pos().X() = 0.5*sin(0.01*sim_time_.Double()); gzdbg << "plugin simTime [" << sim_time_.Double() << "] update pose [" << pose.Pos().X() << "]\n";
Thank you @oscarkfpang for sharing your experience. It may be useful for other users.
Please, provide details of the error you are experiencing and the versions of the software (e.g. ROS, Gazebo) you are using so that we are able to understand what's going on.