ros-industrial / ros2_canopen

CANopen driver framework for ROS2
https://ros-industrial.github.io/ros2_canopen/manual/rolling/
141 stars 60 forks source link

Publish to joint_states, not joint_state #63

Closed gavanderhoorn closed 1 year ago

gavanderhoorn commented 1 year ago

As per subject.

Even though this is a private topic, it would still seem like a good idea to use the conventional name (ie: joint_states).

hellantos commented 1 year ago

@gavanderhoorn Thanks for the reminder and good point. I have come by the issue when setting up a demo and getting joint state publisher and robot state publisher running.

hellantos commented 1 year ago

Probably better to merge it after the beast in #60.

hellantos commented 1 year ago

This is now in canopen_402_driver/include/node_interfaces/NodeCanopen402Driver.

template <>
void NodeCanopen402Driver<rclcpp_lifecycle::LifecycleNode>::init(bool called_from_base)
{
    NodeCanopenProxyDriver<rclcpp_lifecycle::LifecycleNode>::init(false);
    publish_joint_state = this->node_->create_publisher<sensor_msgs::msg::JointState>("~/joint_state", 10);

This will probably require a force push of the branch based on the updated master.