ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

lutinplunder's profile - activity

2022-07-04 19:04:13 -0500 asked a question Error: no matching function for call to ‘std::vector<double>::back(double&)

Error: no matching function for call to ‘std::vector<double>::back(double&) I am writing a node to move my rob

2022-06-02 06:41:12 -0500 received badge  Famous Question (source)
2022-06-01 16:16:13 -0500 received badge  Notable Question (source)
2022-06-01 12:45:29 -0500 received badge  Notable Question (source)
2022-06-01 04:56:05 -0500 edited question Need help with code

Need help with code I am trying to figure out how to write the code needed to take the angular Y value from my topic /sh

2022-06-01 04:55:38 -0500 commented question Need help with code

You're right Per Edwardsson I for got the semicolon, I fixed the post.

2022-06-01 04:53:42 -0500 received badge  Popular Question (source)
2022-06-01 04:53:27 -0500 edited question Need help with code

Need help with code I am trying to figure out how to write the code needed to take the angular Y value from my topic /sh

2022-06-01 04:53:27 -0500 received badge  Editor (source)
2022-05-31 21:19:10 -0500 asked a question Need help with code

Need help with code I am trying to figure out how to write the code needed to take the angular Y value from my topic /sh

2022-05-31 03:58:13 -0500 received badge  Notable Question (source)
2022-05-31 01:17:56 -0500 received badge  Popular Question (source)
2022-05-30 17:30:00 -0500 edited question Need help with coding

Need help with coding I am trying to figure out how to write the code needed to take the angular Y value from my topic /

2022-05-30 12:21:46 -0500 asked a question Need help with coding

Need help with coding I am trying to figure out how to write the code needed to take the angular Y value from my topic /

2022-05-30 07:18:17 -0500 marked best answer Unable to get Rviz to display robot

I have been working on a robot of my own design and I have it working with hardware but when I try to visualize it in Rviz it's not working. code repository

When I run the display.launch the robot displays correctly.

<launch>
  <arg
    name="model" />
  <arg
    name="gui"
    default="true" />
  <param
    name="robot_description"
    textfile="$(find shelob_syropod)/robot/shelob_syropod.urdf" />
  <param
    name="use_gui"
    value="$(arg gui)" />
  <node
    name="joint_state_publisher"
    pkg="joint_state_publisher"
    type="joint_state_publisher" />
  <node
    name="robot_state_publisher"
    pkg="robot_state_publisher"
    type="robot_state_publisher" />
  <node
    name="rviz"
    pkg="rviz"
    type="rviz"
    args="-d $(find shelob_syropod)/rviz/urdf.rviz" />
</launch>

However when I use the shelob_highlevel.launch.

<!-- -*- xml -*- -->

<launch>

  <!-- Define ancillary node launch arguments -->
  <arg name="syropod" default="shelob" />
  <arg name="config" default="shelob" />
  <arg name="gait" default="gait" />
  <arg name="auto_pose" default="auto_pose" />
  <arg name="control" default="joy" />
  <arg name="rviz" default="true" />
  <arg name="gazebo" default="false" />
  <arg name="plot" default="false" />
  <arg name="reconfigure" default="false" />
  <arg name="logging" default="false" />

  <!-- Set package name -->
  <arg name="package" value="(find $(arg syropod)_syropod)" />

  <!-- Control method (joypad or keyboard)-->
  <node if="$(eval control == 'joy')" pkg="joy" type="joy_node" name="joystick"/>
  <rosparam if="$(eval control == 'key')" file="$(find syropod_keyboard_control)/config/dell_key_map.yaml" command="load"/>
  <node if="$(eval control == 'key')" pkg="syropod_keyboard_control" type="syropod_keyboard_control_node" name="key" output="screen"/>
  <node if="$(eval control == 'rqt')" pkg="syropod_rqt_reconfigure_control" type="syropod_rqt_reconfigure_control" name="rqt_control" output="screen"/>
  <node if="$(eval control == 'rqt')" pkg="rqt_reconfigure" type="rqt_reconfigure" name="rqt_reconfigure" output="screen"/>

  <!-- Remote Start-->
  <node if="$(eval arg('control') not in ('rqt'))" pkg="syropod_remote" type="syropod_remote" name="syropod_remote" output="screen">
    <param name="publish_rate" value="10"/>
    <param name="imu_sensitivity" value="3"/>
    <param name="invert_compass" value="true"/>
    <param name="invert_imu" value="true"/>
  </node>

  <!-- Highlevel controller related parameters -->
  <rosparam file="$$(arg package)/config/$(arg gait).yaml" command="load"/>
  <rosparam file="$$(arg package)/config/$(arg auto_pose).yaml" command="load"/>
  <rosparam file="$$(arg package)/config/$(arg config).yaml" command="load"/>

  <!-- Highlevel Controller Start -->
  <node name="shc" pkg="syropod_highlevel_controller" type="syropod_highlevel_controller_node" output="screen" />

  <!-- Launch RVIZ with default SHC config -->
  <group if="$(arg rviz)">
    <param name="/syropod/parameters/debug_rviz" value="true"/>
    <param
            name="robot_description"
            textfile="$(find shelob_syropod)/robot/shelob_syropod.urdf" />
    <node name="rviz" pkg="rviz" type="rviz" args="-d $(find syropod_highlevel_controller)/rviz_cfg/shelob_SHC_display.rviz"/>
  </group>

  <!-- Launch Gazebo Simulation -->
  <group if="$(arg gazebo)">
    <param name="/syropod/parameters/individual_control_interface" value="true"/>
    <include file="$$(arg package)/launch/$(arg syropod)_gazebo.launch"/>
  </group>

  <!-- Launch ancillary nodes if requested -->
  <node if="$(arg plot)" name="rqt_plot" pkg="rqt_plot" type="rqt_plot"/>
  <node if="$(arg reconfigure)" name="reconfigure" pkg="rqt_reconfigure" type="rqt_reconfigure"/>

  <!-- Logging -->
  <group if="$(arg logging)">
    <include file="$$(arg package)/launch/$(arg syropod)_log.launch">
      <arg name="bagfile_name" value ...
(more)
2022-05-30 04:12:37 -0500 received badge  Popular Question (source)
2022-05-29 19:35:47 -0500 answered a question Unable to get Rviz to display robot

I figured it out. I needed to launch Rviz with Gazebo in order to load the controllers, use sim time and update the pyth

2022-05-29 19:35:47 -0500 received badge  Rapid Responder (source)
2022-05-29 09:10:23 -0500 asked a question Unable to get Rviz to display robot

Unable to get Rviz to display robot I have been working on a robot of my own design and I have it working with hardware

2021-05-17 10:05:32 -0500 received badge  Famous Question (source)
2021-04-18 06:48:04 -0500 received badge  Nice Question (source)
2021-04-18 06:47:39 -0500 received badge  Famous Question (source)
2021-03-09 14:04:55 -0500 received badge  Notable Question (source)
2021-01-26 16:04:42 -0500 received badge  Student (source)
2021-01-19 12:45:01 -0500 received badge  Famous Question (source)
2021-01-14 13:19:46 -0500 received badge  Notable Question (source)
2021-01-14 13:19:46 -0500 received badge  Popular Question (source)
2020-11-08 20:27:05 -0500 asked a question XmlRpc in ROS2

XmlRpc in ROS2 A package I'm working on converting to Ros2 uses XmlRpc to take a bunch of servo parameters from a global

2020-11-05 20:21:23 -0500 received badge  Popular Question (source)
2020-11-05 10:46:25 -0500 received badge  Notable Question (source)
2020-11-04 21:14:35 -0500 asked a question Question about how Ros2 builds packages

Question about how Ros2 builds packages I am re-writing a ros1 package for ros2 and had a question about how ros2 builds

2020-11-04 20:22:23 -0500 marked best answer exampe of using AsyncParametersClient for multiple params

I am trying to use a parameter node to store all the params that define a robot using the guide HERE.

The examples show are for only one param, how would you do set it up for multiple params? Do I really have to do all those lines of code for each param?

class TestGetGlobalParam : public rclcpp::Node
{
public:
    TestGetGlobalParam() : Node("test_get_global_param")
    {
        parameters_client = 
            std::make_shared<rclcpp::AsyncParametersClient>(this, "/global_parameter_server");

            parameters_client->wait_for_service();
            auto parameters_future = parameters_client->get_parameters(
                {"my_global_param"},
                std::bind(&TestGetGlobalParam::callbackGlobalParam, this, std::placeholders::_1));
        }
        void callbackGlobalParam(std::shared_future<std::vector<rclcpp::Parameter>> future)
        {
            auto result = future.get();
            auto param = result.at(0);
            RCLCPP_INFO(this->get_logger(), "Got global param: %s", param.as_string().c_str());
        }
private:
    std::shared_ptr<rclcpp::AsyncParametersClient> parameters_client;
};

While I know ROS2 is trying to get away from global params, but for the project I have envisioned it's the best way I can think of. I am trying to write a set of packages for legged robots (3 or 4 dof, and 4, 6 or 8 legs) where the user defines their robot via YAML and the code sets up the low level controller for IK, gait, etc.

2020-11-04 20:22:21 -0500 commented answer exampe of using AsyncParametersClient for multiple params

thanks jacobperron, the ROS2 documentation is even worse than the ROS1 version. given what you told me and what the demo

2020-11-04 10:16:39 -0500 received badge  Enthusiast
2020-11-02 21:19:51 -0500 asked a question exampe of using AsyncParametersClient for multiple params

exampe of using AsyncParametersClient for multiple params I am trying to use a parameter node to store all the params th

2020-11-02 21:07:02 -0500 commented answer Unable to get any msgs/srvs to work in CMakeLists

I figured it out, my cmake was fine my includes were pointing to the actual msg name not the name of the generated .hpp.

2020-11-01 22:21:14 -0500 commented answer Unable to get any msgs/srvs to work in CMakeLists

thanks schornak, that did it now I just need to figure out why my custom msgs aren't generating a .hpp EDIT: they are be

2020-11-01 22:10:39 -0500 received badge  Supporter (source)
2020-11-01 22:10:34 -0500 marked best answer Unable to get any msgs/srvs to work in CMakeLists

I am trying to build a controller node for a robot in ROS2 foxy and CMake is kicking my ass. When I try to add a library none of the msgs/srvs work either my custom one or a built in such as std_msgs

Here is the type of error I get from the console, it's pretty much the same for all the msgs/srvs:

colcon build --packages-select legged_robot_controller
Starting >>> legged_robot_controller
--- stderr: legged_robot_controller                             
In file included from /home/robdome/ros2_ws/src/legged_robot_controller/src/control.cpp:31:
/home/robdome/ros2_ws/src/legged_robot_controller/include/legged_robot_controller/control.hpp:38:10: fatal error: std_srvs/srv/Empty.hpp: No such file or directory
   38 | #include <std_srvs/srv/Empty.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/control.dir/build.make:63: CMakeFiles/control.dir/src/control.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:107: CMakeFiles/control.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
---
Failed   <<< legged_robot_controller [5.58s, exited with code 2]

Summary: 0 packages finished [6.01s]
  1 package failed: legged_robot_controller
  1 package had stderr output: legged_robot_controller

Here is my CMakeLists:

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(std_srvs REQUIRED)
find_package(nav_msgs REQUIRED)
find_package(legged_robot_msgs REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(dynamixel_sdk REQUIRED)

add_library( control src/control.cpp )
ament_target_dependencies( control
        rclcpp
        tf2_ros
        std_srvs
        std_msgs
        geometry_msgs
        nav_msgs
        sensor_msgs
        legged_robot_msgs_generate_messages_cpp
        )

include_directories(
        include/${PROJECT_NAME}
)

install(DIRECTORY include/${PROJECT_NAME}
        DESTINATION include/${PROJECT_NAME}
        )

ament_export_include_directories(include)
ament_export_dependencies(rclcpp geometry_msgs sensor_msgs std_srvs std_msgs legged_robot_msgs 

tf2_ros)

ament_package()

I've spent that last day or so trying to figure it out on my own to no avail, I apologize if I'm doing something stupid I'm new to ROS and don't have a whole lot of C++ experience.

2020-11-01 22:10:34 -0500 received badge  Scholar (source)
2020-11-01 22:10:30 -0500 commented answer Unable to get any msgs/srvs to work in CMakeLists

thanks schornak, that did it now I just need to figure out why my custom msgs aren't generating a .hpp

2020-11-01 20:48:12 -0500 received badge  Popular Question (source)
2020-10-31 10:29:54 -0500 answered a question Solidworks to URDF plugin for robot arm

Not sure if you've tried this but the ROS wiki has some tutorials. I used them to create a URDF for this While the exp

2020-10-31 10:29:54 -0500 asked a question Unable to get any msgs/srvs to work in CMakeLists

Unable to get any msgs/srvs to work in CMakeLists I am trying to build a controller node for a robot in ROS2 foxy and CM