Skip to content

advertise<trajectory_msgs::JointTrajectory> doesn't work #18

@oridong

Description

@oridong

VMware ubuntu20
the examples given works well,but my own

"auto pub =n.advertise<trajectory_msgs::JointTrajectory>("trajV_reflexx", 1000); "
doesn't work.

    while ( ros::ok())
    {
             ....
            trajectory_msgs::JointTrajectory joint_state; 
        trajectory_msgs::JointTrajectoryPoint joint_state_pt; 
        joint_state_pt.velocities.push_back((*OP->NewVelocityVector)[0]);
        joint_state.points.push_back(joint_state_pt) ;
                    pub.publish(joint_state);
}

rqt throw err: Traceback (most recent call last): File "/opt/ros/noetic/lib/python3/dist-packages/rospy/topics.py", line 748, in _invoke_callback cb(msg, cb_args) File "/home/d/planning/ws_traj/src/rqt_joint_trajectory_plot/src/rqt_joint_trajectory_plot/main_widget.py", line 109, in callback msg = JointTrajectory().deserialize(anymsg._buff) AttributeError: 'JointTrajectory' object has no attribute '_buff'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions