##

JointVisual.hh
Go to the documentation of this file.
/*
* Copyright (C) 2012 Open Source Robotics Foundation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#ifndef GAZEBO_RENDERING_JOINTVISUAL_HH_
#define GAZEBO_RENDERING_JOINTVISUAL_HH_
#include <string>
#include <ignition/math/Pose3.hh>
#include "gazebo/msgs/MessageTypes.hh"
#include "gazebo/rendering/Visual.hh"
#include "gazebo/util/system.hh"
namespace gazebo
{
namespace rendering
{
class GZ_RENDERING_VISIBLE JointVisual : public Visual
{
public: JointVisual(const std::string &_name, VisualPtr _vis);
public: virtual ~JointVisual();
public: void Load(ConstJointPtr &_msg);
using Visual::Load;
public: virtual void Fini();
public: void Load(ConstJointPtr &_msg,
const ignition::math::Pose3d &_worldPose);
public: ArrowVisualPtr CreateAxis(const ignition::math::Vector3d &_axis,
const bool _useParentFrame, const msgs::Joint::Type &_type);
// Documentation Inherited.
public: virtual void SetVisible(bool _visible, bool _cascade = true);
public: void UpdateFromMsg(ConstJointPtr &_msg);
public: void UpdateAxis(ArrowVisualPtr _arrowVisual,
const ignition::math::Vector3d &_axis, const bool _useParentFrame,
const msgs::Joint::Type &_type);
public: JointVisualPtr GetParentAxisVisual() const;
public: ArrowVisualPtr GetArrowVisual() const;
};
}
}
#endif
gazebo::rendering::JointVisual::~JointVisual
virtual ~JointVisual()
Destructor.
gazebo::rendering::Visual::Load
virtual void Load()
Load the visual with default parameters.
gazebo
Forward declarations for the common classes.
Definition: Animation.hh:26
gazebo::rendering::ArrowVisualPtr
std::shared_ptr< ArrowVisual > ArrowVisualPtr
Definition: RenderTypes.hh:150
system.hh
gazebo::rendering::JointVisual::GetParentAxisVisual
JointVisualPtr GetParentAxisVisual() const
Get the JointVisual which is attached to the parent link.
gazebo::rendering::JointVisual
Visualization for joints.
Definition: JointVisual.hh:38
gazebo::rendering::JointVisual::UpdateFromMsg
void UpdateFromMsg(ConstJointPtr &_msg)
Update the joint visual based on a message.
gazebo::rendering::JointVisual::JointVisual
JointVisual(const std::string &_name, VisualPtr _vis)
Constructor.
gazebo::rendering::JointVisual::CreateAxis
ArrowVisualPtr CreateAxis(const ignition::math::Vector3d &_axis, const bool _useParentFrame, const msgs::Joint::Type &_type)
Create an axis and attach it to the joint visual.
rendering
rendering
Definition: RenderEngine.hh:31
gazebo::rendering::JointVisual::Fini
virtual void Fini()
Documentation Inherited.
gazebo::rendering::Visual
A renderable object.
Definition: Visual.hh:60
Visual.hh
gazebo::rendering::JointVisualPtr
std::shared_ptr< JointVisual > JointVisualPtr
Definition: RenderTypes.hh:142
gazebo::rendering::JointVisual::SetVisible
virtual void SetVisible(bool _visible, bool _cascade=true)
Set whether the visual is visible.
gazebo::rendering::VisualPtr
std::shared_ptr< Visual > VisualPtr
Definition: RenderTypes.hh:114
gazebo::rendering::JointVisual::UpdateAxis
void UpdateAxis(ArrowVisualPtr _arrowVisual, const ignition::math::Vector3d &_axis, const bool _useParentFrame, const msgs::Joint::Type &_type)
Update an axis' arrow visual.
gazebo::rendering::JointVisual::GetArrowVisual
ArrowVisualPtr GetArrowVisual() const
Get the arrow visual which represents the axis attached to the child link.