2022-01-04 06:40:42 -0500 | received badge | ● Famous Question
(source)
|
2019-10-18 01:33:28 -0500 | received badge | ● Nice Question
(source)
|
2019-10-18 01:33:21 -0500 | received badge | ● Self-Learner
(source)
|
2019-10-18 00:26:02 -0500 | marked best answer | Node unable to subscribe the specified topic Specification: Ubuntu 16.04, ROS kinetic, Gazebo, turtlebot3 Here is my rqt_graph
There is a node /negotiator which should subscribe cca_cmd_vel and publish to cmd_vel . turtlebot3_teleop_keyboard and move_base publish on cca_cmd_vel . Here is the code #include "ros/ros.h"
#include "geometry_msgs/Twist.h"
void cca_cmd_velCallback(const geometry_msgs::Twist::ConstPtr& vel)
{
geometry_msgs::Twist new_vel = *vel;
cmd_vel_pub.publish(new_vel);
}
int main(int argc, char **argv)
{
//Negotiator Subscribe cmd_vel
ros::init(argc, argv, "negotiator");
ros::NodeHandle n;
ros::Subscriber sub = n.subscribe("cca_cmd_vel", 1000, cca_cmd_velCallback);
//Negotiator Publish to GAZEBO
ros::Publisher cmd_vel_pub = n.advertise<geometry_msgs::Twist>("cmd_vel", 1000);
//ros::Publisher cmd_vel_pub = n.advertise<geometry_msgs::Twist>("cmd_vel", 1000);
ros::spin();
return 0;
}
Kindly suggest where to improve Few More add on information crlab@crlab-500-100IX:~$ rostopic info cca_cmd_vel Type: geometry_msgs/Twist
Publishers:
* /move_base (http://localhost:34459/)
* /turtlebot3_teleop_keyboard (http://localhost:41875/)
Subscribers: None
crlab@crlab-500-100IX:~$ rostopic info cmd_vel Type: geometry_msgs/Twist
Publishers: None
Subscribers:
* /gazebo (http://localhost:33175/)
* /negotiator (http://localhost:35659/)
crlab@crlab-500-100IX:~$ rosnode info negotiator --------------------------------------------------------------------------------
Node [/negotiator]
Publications:
* /rosout [rosgraph_msgs/Log]
Subscriptions:
* /clock [rosgraph_msgs/Clock]
* /cmd_vel [unknown type]
Services:
* /negotiator/get_loggers
* /negotiator/set_logger_level
contacting node http://localhost:35659/ ...
Pid: 4967
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /clock
* to: /gazebo (http://localhost:33175/)
* direction: inbound
* transport: TCPROS
crlab@crlab-500-100IX:~$ rosnode info turtlebot3_teleop_keyboard --------------------------------------------------------------------------------
Node [/turtlebot3_teleop_keyboard]
Publications:
* /cca_cmd_vel [geometry_msgs/Twist]
* /rosout [rosgraph_msgs/Log]
Subscriptions:
* /clock [rosgraph_msgs/Clock]
Services:
* /turtlebot3_teleop_keyboard/get_loggers
* /turtlebot3_teleop_keyboard/set_logger_level
contacting node http://localhost:41875/ ...
Pid: 4938
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /clock
* to: /gazebo (http://localhost:33175/)
* direction: inbound
* transport: TCPROS
crlab@crlab-500-100IX:~$ rosnode info move_base Node [/move_base]
Publications:
* /cca_cmd_vel [geometry_msgs/Twist]
* /move_base/DWAPlannerROS/cost_cloud [sensor_msgs/PointCloud2]
* /move_base/DWAPlannerROS/global_plan [nav_msgs/Path]
* /move_base/DWAPlannerROS/local_plan [nav_msgs/Path]
* /move_base/DWAPlannerROS/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /move_base/DWAPlannerROS/parameter_updates [dynamic_reconfigure/Config]
* /move_base/DWAPlannerROS/trajectory_cloud [sensor_msgs/PointCloud2]
* /move_base/NavfnROS/plan [nav_msgs/Path]
* /move_base/current_goal [geometry_msgs/PoseStamped]
* /move_base/feedback [move_base_msgs/MoveBaseActionFeedback]
* /move_base/global_costmap/costmap [nav_msgs/OccupancyGrid]
* /move_base/global_costmap/costmap_updates [map_msgs/OccupancyGridUpdate]
* /move_base/global_costmap/footprint [geometry_msgs/PolygonStamped]
* /move_base/global_costmap/inflation_layer/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /move_base/global_costmap/inflation_layer/parameter_updates [dynamic_reconfigure/Config]
* /move_base/global_costmap/obstacle_layer/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /move_base/global_costmap/obstacle_layer/parameter_updates [dynamic_reconfigure/Config]
* /move_base/global_costmap/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /move_base/global_costmap/parameter_updates [dynamic_reconfigure/Config]
* /move_base/global_costmap/static_layer/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /move_base/global_costmap/static_layer/parameter_updates [dynamic_reconfigure/Config]
* /move_base/goal [move_base_msgs/MoveBaseActionGoal]
* /move_base/local_costmap/costmap [nav_msgs/OccupancyGrid]
* /move_base/local_costmap/costmap_updates [map_msgs/OccupancyGridUpdate]
* /move_base/local_costmap/footprint [geometry_msgs/PolygonStamped]
* /move_base/local_costmap/inflation_layer/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /move_base/local_costmap/inflation_layer/parameter_updates [dynamic_reconfigure/Config]
* /move_base/local_costmap/obstacle_layer/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /move_base/local_costmap/obstacle_layer/parameter_updates [dynamic_reconfigure/Config]
* /move_base/local_costmap/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /move_base/local_costmap/parameter_updates [dynamic_reconfigure/Config]
* /move_base/parameter_descriptions [dynamic_reconfigure/ConfigDescription]
* /move_base/parameter_updates [dynamic_reconfigure/Config]
* /move_base/result [move_base_msgs/MoveBaseActionResult]
* /move_base/status [actionlib_msgs/GoalStatusArray]
* /rosout [rosgraph_msgs/Log]
Subscriptions:
* /clock [rosgraph_msgs/Clock]
* /map [nav_msgs/OccupancyGrid]
* /move_base/cancel [unknown type]
* /move_base/global_costmap/footprint [geometry_msgs/PolygonStamped]
* /move_base/goal [move_base_msgs/MoveBaseActionGoal]
* /move_base/local_costmap/footprint [geometry_msgs/PolygonStamped]
* /move_base_simple/goal [geometry_msgs/PoseStamped]
* /odom [nav_msgs/Odometry]
* /scan [sensor_msgs/LaserScan]
* /tf [tf2_msgs/TFMessage]
* /tf_static [tf2_msgs/TFMessage]
Services:
* /move_base/DWAPlannerROS/set_parameters
* /move_base/NavfnROS/make_plan
* /move_base/clear_costmaps
* /move_base/get_loggers
* /move_base/global_costmap/inflation_layer/set_parameters
* /move_base/global_costmap/obstacle_layer ... (more) |
2019-10-18 00:25:50 -0500 | answered a question | Node unable to subscribe the specified topic The exact answer of my question is
#include "ros/ros.h"
#include "geometry_msgs/Twist.h"
ros::Publisher vel_pub;
voi |
2019-10-01 06:27:33 -0500 | commented answer | Node unable to subscribe the specified topic thanks @Reamees , your link solved my problem.
|
2019-10-01 06:27:15 -0500 | commented answer | Node unable to subscribe the specified topic thanks @Delb , your link solved my problem.
|
2019-09-28 18:24:31 -0500 | received badge | ● Famous Question
(source)
|
2019-09-27 17:15:05 -0500 | received badge | ● Notable Question
(source)
|
2019-09-27 07:23:56 -0500 | received badge | ● Popular Question
(source)
|
2019-09-27 05:39:16 -0500 | commented question | Node unable to subscribe the specified topic @LeoE 1. Whatever I have copied is correct. 2. This is the first node I am writing. There is no other remapping taking |
2019-09-27 04:59:13 -0500 | commented question | Node unable to subscribe the specified topic @Reamees I am executing node through
rosrun ecca negotiator
Once I can republish the data , I will later do some proc |
2019-09-27 04:45:04 -0500 | received badge | ● Student
(source)
|
2019-09-27 03:16:04 -0500 | edited question | Node unable to subscribe the specified topic Node unable to subscribe the specified topic
Specification: Ubuntu 16.04, ROS kinetic, Gazebo, turtlebot3
Here is my rq |
2019-09-27 03:07:48 -0500 | asked a question | Node unable to subscribe the specified topic Node unable to subscribe the specified topic
Specification: Ubuntu 16.04, ROS kinetic, Gazebo, turtlebot3
Here is my rq |
2019-07-29 03:16:38 -0500 | received badge | ● Notable Question
(source)
|
2019-07-29 03:16:38 -0500 | received badge | ● Famous Question
(source)
|
2019-03-07 04:27:14 -0500 | received badge | ● Notable Question
(source)
|
2018-07-20 05:33:00 -0500 | received badge | ● Famous Question
(source)
|
2018-04-10 13:48:00 -0500 | received badge | ● Notable Question
(source)
|
2018-04-10 13:48:00 -0500 | received badge | ● Famous Question
(source)
|
2017-12-30 07:53:51 -0500 | received badge | ● Famous Question
(source)
|
2017-11-21 05:56:56 -0500 | received badge | ● Notable Question
(source)
|
2017-11-21 05:56:56 -0500 | received badge | ● Famous Question
(source)
|
2017-09-30 12:59:47 -0500 | received badge | ● Notable Question
(source)
|
2017-09-30 12:59:47 -0500 | received badge | ● Famous Question
(source)
|
2017-06-05 11:07:52 -0500 | received badge | ● Notable Question
(source)
|
2017-04-07 01:59:41 -0500 | received badge | ● Popular Question
(source)
|
2017-02-20 12:05:31 -0500 | received badge | ● Popular Question
(source)
|
2017-02-10 00:48:37 -0500 | marked best answer | Error while installing "ros-indigo-ros-controllers" I am using Ubuntu 14.04 LTS, wish to use GAZEBO as a simulator, with p3DX vehicle. and following steps given here. While Installing Additional ROS Packages mentioned in step 6. sudo apt-get install ros-indigo-ros-controllers
i am getting error, which can be visualize at the end of output below. bcr-lab@bcrlab-HP-Z800-Workstation:~/catkin_ws$ sudo apt-get install ros-indigo-ros-controllers
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
ros-indigo-diff-drive-controller ros-indigo-effort-controllers
ros-indigo-force-torque-sensor-controller
ros-indigo-forward-command-controller ros-indigo-gripper-action-controller
ros-indigo-imu-sensor-controller ros-indigo-joint-state-controller
ros-indigo-joint-trajectory-controller ros-indigo-position-controllers
ros-indigo-rqt-joint-trajectory-controller ros-indigo-velocity-controllers
The following NEW packages will be installed:
ros-indigo-diff-drive-controller ros-indigo-effort-controllers
ros-indigo-force-torque-sensor-controller
ros-indigo-forward-command-controller ros-indigo-gripper-action-controller
ros-indigo-imu-sensor-controller ros-indigo-joint-state-controller
ros-indigo-joint-trajectory-controller ros-indigo-position-controllers
ros-indigo-ros-controllers ros-indigo-rqt-joint-trajectory-controller
ros-indigo-velocity-controllers
0 upgraded, 12 newly installed, 0 to remove and 38 not upgraded.
Need to get 34.0 kB/682 kB of archives.
After this operation, 3,601 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err http://packages.ros.org/ros/ubuntu/ trusty/main ros-indigo-force-torque-sensor-controller amd64 0.9.3-0trusty-20160627-235716-0700
403 Forbidden
E: Failed to fetch http://packages.ros.org/ros/ubuntu/pool/main/r/ros-indigo-force-torque-sensor-controller/ros-indigo-force-torque-sensor-controller_0.9.3-0trusty-20160627-235716-0700_amd64.deb 403 Forbidden
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Unable to understand what to do. Please help. I am new to ROS. |
2017-01-28 11:15:49 -0500 | received badge | ● Popular Question
(source)
|
2016-11-16 18:59:13 -0500 | received badge | ● Popular Question
(source)
|
2016-11-08 14:37:42 -0500 | received badge | ● Famous Question
(source)
|
2016-11-01 00:26:24 -0500 | received badge | ● Popular Question
(source)
|
2016-10-20 04:27:18 -0500 | asked a question | Error installing "ros-indigo-ros-controllers" I want to use ros-gazebo-p3at.
I have installed ubuntu 14.04/ Ros-indigo / and gazebo as given here . But while installing ros-controller; sudo apt-get install ros-indigo-ros-controllers
i am getting an error; Err http://packages.ros.org/ros/ubuntu/ trusty/main ros-indigo-force-torque-sensor-controller i386 0.9.3-0trusty-20160627-193242-0700
403 Forbidden
E: Failed to fetch http://packages.ros.org/ros/ubuntu/pool/main/r/ros-indigo-force-torque-sensor-controller/ros-indigo-force-torque-sensor-controller_0.9.3-0trusty-20160627-193242-0700_i386.deb 403 Forbidden
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
What to do. |
2016-10-18 05:36:57 -0500 | edited question | USARSimROS : [ERROR] Unknown conf type Camera I am using ROS as a software framework and USARSim as simulator.
and using a middleware package usarsim_inf to connect them. ROS is installed in PC1 (Ubuntu 12.04) and USARSim is installed in PC2 (Windows 7). i am successfully able to connect both the machine and able to spawn a P3AT in USARSim via ROS.
By executing : roslaunch usarsim_inf usarsim.launch
ISSUE 1: [ERROR] [1475661045.907769294]: Unknown conf type Camera
=====================Here is my launch file===============
<launch>
<param name="usarsim/robotType" value="P3AT" />
<param name="usarsim/hostname" value="172.15.15.60" />
<param name="usarsim/port" value="3000" />
<param name="usarsim/startPosition" value="0,0,0" />
<param name="usarsim/odomSensor" value="InsTest" />
<node name="RosSim" pkg="usarsim_inf" type="usarsim_node"/>
<remap from="lms200" to="scan" />
</launch>
==================================================
please suggest. Solution for ISSUE 1:
after commenting AddParts : camera in UDKUSAR.ini, it is no more showing this error.
Thanks to @Steveb ;AddParts=(ItemClass=class'USARSensor.USARCamera',ItemName="Camera",Position=(X=0.1005,Y=0.0,Z=-0.42),Direction=(x=0.0,y=0.0,z=0.0)) ISSUE 2: but while running teleop rosrun teleop_twist_keyboard teleop_twist_keyboard.py
every time i press the key(any key) , it says [ERROR] [1411920792.568087748]: usarsimInf::peerMsg: not handling type SW_SEN_ENCODER
I commented the Encoder in C:\UDK\UDK-2013-07\UDKGame\Config\UDKUSAR.ini [USARBot.P3AT]
AddParts=(ItemClass=class'USARSensor.GroundTruth',ItemName="GndTruth",Position=(X=0,Y=0.0,Z=0),Direction=(x=0.0,y=0.0,z=0.0))
AddParts=(ItemClass=class'USARSensor.INS',ItemName="InsTest",Position=(X=0,Y=0.0,Z=-0.2),Direction=(x=0.0,y=0.0,z=0.0))
AddParts=(ItemClass=class'USARSensor.SICK',ItemName="lms200",Position=(X=0.2085,Y=0.0,Z=-0.2),Direction=(x=0.0,y=0.0,z=0.0))
;AddParts=(ItemClass=class'USARSensor.USARCamera',ItemName="Camera",Position=(X=0.1005,Y=0.0,Z=-0.42),Direction=(x=0.0,y=0.0,z=0.0))
AddParts=(ItemClass=class'USARSensor.Tachometer',ItemName="TachTest",Position=(X=0,Y=0.0,Z=0),Direction=(x=0.0,y=0.0,z=0.0))
;AddParts=(ItemClass=class'USARSensor.Encoder',ItemName="W1",Position=(X=0,Y=0.0,Z=0),Direction=(x=0.0,y=0.0,z=0.0))
;AddParts=(ItemClass=class'USARSensor.Encoder',ItemName="W2",Position=(X=0,Y=0.0,Z=0),Direction=(x=0.0,y=0.0,z=0.0))
AddParts=(ItemClass=class'USARSensor.Battery',ItemName="battery",Position=(X=0.15,Y=0.0,Z=-0.20),Direction=(x=0.0,y=0.0,z=0.0))
But problem still exist. Here is the rqt_graph captured after running above commands. tf Transform tree |
2016-10-18 01:47:07 -0500 | received badge | ● Notable Question
(source)
|
2016-10-18 01:07:30 -0500 | asked a question | ROS-USARSim: sending command over TCP connection PC1: ROS PC2: Simulator (Usarsim) [172.15.15.60/3000] I wish to send a ros command to work on PC2(simulator).
therefore first i need to establish a TCP connection to 172.15.15.60 and port no is 3000. i wish to write a cpp file, guide me where to start. |
2016-10-17 07:57:57 -0500 | edited question | executive_usarsim and teleop issue I wish to interface ROS-USARSim.
and using a interface package executive_usarsim. It spawn P3AT in USARSim but while running
rosrun teleop_twist_keyboard teleop_twist_keyboard.py P3AT do not move. Actually in rqt_graph; executive_usarsim interface donot subscribe twist messages; Therefore i wish to write a cpp node which can subscribe /cmd_vel topic and publish it on /executive_usarsim/status topic. please help how to write it in a single cpp file. Here is rosnode info executive_usarsim cr-lab-tu@crlabtu-HP-Compaq-8100-Elite-SFF-PC:~$ rosnode info executive_usarsim
--------------------------------------------------------------------------------
Node [/executive_usarsim]
Publications:
* /executive_usarsim/status [std_msgs/String]
* /rosout [rosgraph_msgs/Log]
Subscriptions:
* /executive_usarsim/status [std_msgs/String]
Services:
* /executive_usarsim/get_loggers
* /executive_usarsim/set_logger_level
contacting node http://crlabtu-HP-Compaq-8100-Elite-SFF-PC:45055/ ...
Pid: 12463
Connections:
* topic: /executive_usarsim/status
* to: /executive_usarsim
* direction: outbound
* transport: TCPROS
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /executive_usarsim/status
* to: /executive_usarsim (http://crlabtu-HP-Compaq-8100-Elite-SFF-PC:45055/)
* direction: inbound
* transport: TCPROS
and rosnode info teleop_twist_keyboard cr-lab-tu@crlabtu-HP-Compaq-8100-Elite-SFF-PC:~$ rosnode info teleop_twist_keyboard
--------------------------------------------------------------------------------
Node [/teleop_twist_keyboard]
Publications:
* /rosout [rosgraph_msgs/Log]
* /cmd_vel [geometry_msgs/Twist]
Subscriptions: None
Services:
* /teleop_twist_keyboard/set_logger_level
* /teleop_twist_keyboard/get_loggers
contacting node http://crlabtu-HP-Compaq-8100-Elite-SFF-PC:55529/ ...
Pid: 12620
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
EDIT1: here is the code i have written to solve the above issue, #include <ros/ros.h>
#include "std_msgs/String.h"
#include <sstream>
class SubscribeAndPublish
{
public:
SubscribeAndPublish()
{
//Topic you want to publish
pub_ = n_.advertise<std_msgs::String>("/executive_usarsim", 1);
//Topic you want to subscribe
sub_ = n_.subscribe("/cmd_vel", 1, &SubscribeAndPublish::callback, this);
}
void callback(const std_msgs::String::ConstPtr& input)
{
std_msgs::String output;
//output=input;
//.... do something with the input and generate the output...
pub_.publish(input);
}
private:
ros::NodeHandle n_;
ros::Publisher pub_;
ros::Subscriber sub_;
};//End of class SubscribeAndPublish
int main(int argc, char **argv)
{
//Initiate ROS
ros::init(argc, argv, "sub-pub");
//Create an object of class SubscribeAndPublish that will take care of everything
SubscribeAndPublish SAPObject;
ros::spin();
return 0;
}
But it is only publishing and not subscribing. bcrlab@bcrlab-HP-Compaq-8100-Elite-SFF-PC:~$ rosnode info sub_pub
--------------------------------------------------------------------------------
Node [/sub_pub]
Publications:
* /executive_usarsim/status [std_msgs/String]
* /rosout [rosgraph_msgs/Log]
Subscriptions:
* /cmd_vel [geometry_msgs/Twist]
Services:
* /sub_pub/set_logger_level
* /sub_pub/get_loggers
contacting node http://bcrlab-HP-Compaq-8100-Elite-SFF-PC:33082/ ...
Pid: 21939
Connections:
* topic: /rosout
* to: /rosout
* direction: outbound
* transport: TCPROS
* topic: /executive_usarsim/status
* to: /executive_usarsim
* direction: outbound
* transport: TCPROS
and bcrlab@bcrlab-HP-Compaq-8100-Elite-SFF-PC:~$ rostopic info \cmd_vel
Type: geometry_msgs/Twist
Publishers:
* /teleop_twist_keyboard (http://bcrlab-HP-Compaq-8100-Elite-SFF-PC:45082/)
Subscribers:
* /sub_pub (http://bcrlab-HP-Compaq-8100-Elite-SFF-PC:33082/)
EDIT2: Here is the updated code which work for me, #include <ros/ros.h>
#include "std_msgs/String.h"
#include <sstream>
#include <geometry_msgs/Twist.h>
class SubscribeAndPublish
{
public:
SubscribeAndPublish()
{
//Topic you want to publish
pub_ = n_.advertise<geometry_msgs::Twist>("/executive_usarsim/pub_tele", 1);
//Topic you want to subscribe
sub_ = n_.subscribe("/cmd_vel", 1, &SubscribeAndPublish::callback, this);
}
void callback(const geometry_msgs::Twist::ConstPtr& input)
{
geometry_msgs::Twist output;
//output=input;
//.... do something with the input and generate the output...
pub_.publish(input);
}
private:
ros::NodeHandle n_;
ros::Publisher pub_;
ros::Subscriber sub_;
};//End of class SubscribeAndPublish
int main(int argc, char **argv)
{
//Initiate ROS
ros::init(argc, argv, "sub_pub");
//Create an object of class SubscribeAndPublish that will take care of everything
SubscribeAndPublish SAPObject;
ros::spin();
return 0;
}
But now the issue is ... (more) |