3 #include <gazebo/gazebo_client.hh> 4 #include <gazebo/transport/transport.hh> 8 const std::string
CAR_NAME = std::string(
"racer");
23 gazebo::transport::NodePtr m_gazebo_node;
24 gazebo::transport::PublisherPtr m_camera_pose_publisher;
25 gazebo::transport::SubscriberPtr m_racer_pose_subscriber;
27 void gazeboPosesCallback(ConstPosesStampedPtr&
message);
28 void publishCameraPose(ignition::math::Pose3d& pose);
29 void updateCamera(ignition::math::Pose3d& car_pose);
31 ignition::math::Vector3d m_last_position;
32 ignition::math::Quaterniond m_last_rotation;
Chase camera Gazebo node that listens to racer pose messages and updates the Gazebo client camera pos...
constexpr const char * TOPIC_CAMERA_POSE
const ignition::math::Vector3d CAMERA_OFFSET(-1.7, 0, 0.5)
constexpr const char * TOPIC_GAZEBO_POSES
const std::string CAR_NAME